511 reputation
36
bio website
location
age
visits member for 2 years, 3 months
seen Sep 26 '12 at 0:47
stats profile views 18

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
Feb
6
answered Where does the -i option in sed store the lines matching a regex?
Feb
6
comment Where does the -i option in sed store the lines matching a regex?
The temporary file should go in $TMPDIR, so the user ought to be able to set TMPDIR to point to a partition with more space. Unfortunately, gnu sed 4.1.2 actually doesn't honor TMPDIR and doesn't even go to /tmp, but uses the directory in which the file being worked on resides (this makes some sense, since it guarantees that the tmpfile is on the same partition so the final move is just a rename, but hurts for the current situation.) On the other hand, -i is a complete hack, and the user could just as easily do the file moves.
Feb
6
revised What is the point of ls -f (or, why is this hanging?)
added 53 characters in body
Feb
6
awarded  Editor