617 reputation
57
bio website
location
age
visits member for 3 years, 6 months
seen Jul 3 at 3:40

Jul
24
awarded  Yearling
Mar
19
awarded  Good Answer
Jan
8
comment Truncating strings after a word in unix
As stated, a perfectly valid solution is: echo Albert Einstein was born in Ulm, in the Kingdom. How exactly to you want this transformation? Do you want a grammar analysis (difficult) or do you just want the first 3 words after punctuation, or do you want the first 9 words, or ...?
Jun
29
awarded  Critic
Feb
7
awarded  Yearling
Dec
7
comment unix command to print till 3rd occurence of “/” in each line
If your input is representative, it would probably be better to instead print everything up to the first ?, and awk '{print $1}' FS=? works nicely.
Oct
6
comment Find files which are created a certain time after or before a particular file was created
No common file system records the creation time of a file. You can use the last time a file was modified, the last time it was accessed, and the last time its meta-data was modified. There is no way to know when a file was created (unless you are using an exotic file system.)
Sep
26
comment The most universal scripting language for Linux is?
Certainly bash can be installed and run on (nearly) any Linux box, but many debian users will install only dash and prefer not to install bash.
May
31
comment bash using a file name as input
@choroba My mistake, I thought the solution had ${first_u_file#U} and did not notice the space after the U, which removes the space I was concerned about.
May
31
comment bash using a file name as input
You need to be careful: this solution leaves an extra blank at the beginning of first_u_file, which may be an issue depending on how it is used.
May
31
answered bash using a file name as input
Apr
7
comment Renaming a bunch of files but keeping the number part
There's never a need for quotes around $(). The operator itself serves as a quoting mechanism.
Apr
7
awarded  Commentator
Apr
7
comment Renaming a bunch of files but keeping the number part
@Digital Robot -- try it with double quotes (edited)
Apr
7
revised Renaming a bunch of files but keeping the number part
Add quotes
Apr
7
answered Renaming a bunch of files but keeping the number part
Mar
15
awarded  Enlightened
Feb
8
comment Two pipes to one command
@sven It is the program that opens the file, and not the shell. When the program starts, it has only the usual file descriptors open.
Feb
8
comment Two pipes to one command
The process is not started with any additional file descriptors open. Instead, it is passed the name of a named pipe or some file in /dev/fd.
Feb
7
awarded  Yearling