479 reputation
28
bio website about.me/johnsyweb
location Melbourne, VIC, .au
age
visits member for 4 years
seen Nov 3 at 20:18

Vimthusiast

On Down-voting

About two percent of my votes are down-votes, which I think is quite low. Down-voting is an important part of StackExchange and helps separate the good answers (and questions) from the not-so-good. If I have down-voted one of your posts, I will have left you a comment as to why. If you down-vote one of my posts, I ask that you, too, leave a comment as to why so that I can either improve my post or remove it. Thank you.


Jun
12
comment Adding paths to PATH using a multi-line syntax
+1 (This question is tagged zsh)
Feb
6
comment sed into csv format
Why sed and not awk (or perl or python or ...)?
Feb
4
comment How do I delete this folder in Solaris?
Nasty! Glad you found it.
Feb
4
comment How do I delete this folder in Solaris?
@KentPawar: I've updated my answer accordingly. I'm not sure it warranted a downvote as it was a reasonable response to the question as it stood at the time with double-quotes.
Aug
7
comment How can I print lines from file backwards (without using “tac”)?
@Peter: Personally I'd use tac.
Jan
8
comment Testing C++ code with bash commands
Why have you posted this here and there?
Dec
18
comment How to name a file in the deepest level of a directory tree
N.B: If you just want to print the filename, you can omit deepest=$( [...] ) and start from find. It's not really clear what you're trying to achieve.
Dec
18
comment How to name a file in the deepest level of a directory tree
I see. There are many ways to solve this. I recommend my own solution since it involves only one |, keeping subprocesses to a minimum.
Dec
18
comment How to name a file in the deepest level of a directory tree
Your one-liner is incomprehensible to me. I'm sorry I cannot debug that for you. Does my example not do what you asked for?
Dec
17
comment How to name a file in the deepest level of a directory tree
Why should they be one-liners? As you've seen , when a one-liner goes wrong, it's very hard to debug! Open an editor and write a bash script!
Dec
17
comment How to name a file in the deepest level of a directory tree
Why do so many people try to do so much on one line? I don't get it!
Oct
4
comment How to group grep results?
Take a look at Ack betterthangrep.com
May
11
comment loop curl get request bash
If ${author} includes spaces or similar characters, you will want to URL encode them, otherwise you may find you get errors like code 400, message Bad request syntax ('GET /authors?string=shakespeare, w.&proc=39 HTTP/1.1') from your HTTP server.
Apr
28
comment Can I insert sudo via the ^ command?
@Default: Welcome! "Thanks for your answer :)" is best expressed as a green tick next to the answer that helped you most. FAQ
Apr
2
comment Switch from grep to sed
@fred.bear: Thank you. And thanks for pointing out that I didn't need gsub. The check for 1987 could be localised to the end of column 2, thus: awk -F':' '$2 ~ /\.1987$/ {sub(/,.*/, ""); print}' students.txt
Mar
18
comment A problem with find and grep
This assumes GNU grep, of course.
Mar
18
comment How do I reuse the last output from the command line?
I use `!!` all the time.
Mar
18
comment A problem with find and grep
fg is a shell builtin, I recommend you chose a different name whether you implement this as an alias or (better still) a function.
Mar
16
comment How can I print lines from file backwards (without using “tac”)?
It's a famous sed one-liner. See "36. Reverse order of lines (emulate "tac" Unix command)." in Famous Sed One-Liners Explained for a full explanation of how it works.