4,778 reputation
621
bio website
location Ottawa, Canada
age
visits member for 3 years, 11 months
seen 8 hours ago

Developer at Pythian.
Big Tcl and Perl fan.
Enjoy Ruby and JavaScript too.


Dec
24
comment cat vs grep vs awk command get the file content which one is more efficient and less time consuming?
You might also want to benchmark sed "" temp.txt
Dec
24
comment cat vs grep vs awk command get the file content which one is more efficient and less time consuming?
I feel compelled to point out that we're on the millisecond scale here. In practical terms, the difference is vanishingly small. en.wikipedia.org/wiki/Program_optimization#When_to_optimize
Dec
24
comment cat vs grep vs awk command get the file content which one is more efficient and less time consuming?
Note that awk 1 temp.txt should be quicker than awk '/$/' temp.txt since it doesn't have to compare each line to a regex.
Dec
23
comment Glob behavior differences between script and command line
I suppose you could do alias ldr='ls -dlrta' to get the same effect
Dec
23
answered Glob behavior differences between script and command line
Dec
23
revised How to use sed to find the strings between 2 patterns?
added 302 characters in body
Dec
23
answered How to use sed to find the strings between 2 patterns?
Dec
23
answered Append line numbers at end of each line in the file
Dec
22
comment Alternative for |(pipe) operator
@KasiyA, I still don't understand the purpose of this question. Are you trying to avoid running the commands in subshells? Are you offended by the shape of the |? The 2nd question is snarky, but what problem are you trying to solve?
Dec
22
comment Alternative for |(pipe) operator
edited with Oli's suggestion: cmd2 < <(cmd1) is more like it.
Dec
22
revised Alternative for |(pipe) operator
added 2 characters in body
Dec
22
answered cant cd to a directory error while moving files to another directory
Dec
21
comment Is there a good replacement for !! (bang bang) in fish?
question also asked here superuser.com/q/719531/4714
Dec
16
comment piping in real time
Have you tried it? It should work without problems. Even though tail never terminates, I believe it does not buffer it's output, so grep can consume it immediately. This may be specific to GNU tail
Dec
15
comment Start script on boot up?
duplicate: unix.stackexchange.com/q/174314/4667 -- go there first, there are some answers
Dec
11
answered Automatically running tmux in fish
Dec
10
comment Checking for a file and whether it is readable and writable
read Bash Conditional Expressions in the manual, and use the -r and -w operators
Dec
6
comment Bash script works from command line, but not if started by upstart
Whose $HOME are you expecting to find the log file? root's $HOME is /
Dec
5
comment What is the purpose of '/' in awk command?
Yes, anywhere in the line. The stuff between the /.../ is a regular expression, so you can create very complex matches.
Dec
1
comment variable is not found in a bash script
You may be thinking of echo ${createdeps} (with curly braces). That is not the same as using double quotes. As the manual says: "The parameter name or symbol to be expanded may be enclosed in braces, which are optional but serve to protect the variable to be expanded from characters immediately following it which could be interpreted as part of the name."