Reputation
5,470
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 19 26
Newest
 Good Answer
Impact
~620k people reached

Jan
19
answered Vim copy-paste across terminals
Jan
19
answered Is there any software to help me learn the Dvorak layout?
Jan
19
answered Cannot take screen shots of my Android phone from windows 7
Jan
19
comment is there any way to get into my nokia (3120 classic) without using nokia's software
The docs show a --getsms option. wiki.gnokii.org/index.php/SMS_options
Jan
19
answered is there any way to get into my nokia (3120 classic) without using nokia's software
Jan
19
comment Byzantine behaviour in shell script
Oops, you're right. But wow, that way of setting IFS looks even worse than IFS='<newline>' to me. :-)
Jan
19
answered Firefox 4 show tools menu in button interface
Jan
19
comment Byzantine behaviour in shell script
$'\n' comes from ksh93 AFAICT, and is also available in zsh and bash, but not dash. www2.research.att.com/sw/download/man/man1/ksh-man.html#Quoting
Jan
18
comment Byzantine behaviour in shell script
Don't type <ENTER>. Press the Enter key. :-) I edited my example above to show you.
Jan
18
revised Byzantine behaviour in shell script
add /bin/sh version
Jan
18
comment Byzantine behaviour in shell script
Yes, both Dennis's example and my example use $'\n'. If you are on Debian or Ubuntu, you have to change that to a literal newline (i.e. press Enter), because /bin/sh doesn't support that.
Jan
18
comment Byzantine behaviour in shell script
Yes, I'm guessing rm -i reads from stdin, which is supplied by the heredoc, rather than from /dev/tty.
Jan
18
comment Byzantine behaviour in shell script
If you're not using bash, you have to replace IFS=$'\n' with IFS='<ENTER>'.
Jan
18
revised Byzantine behaviour in shell script
added 8 characters in body
Jan
18
comment Byzantine behaviour in shell script
I said use set -x because he was using the -x option. For consistency and because I think the set -<flag> form is more common than set -o <optname>.
Jan
18
comment Byzantine behaviour in shell script
He said he was using bash. This allows me to say use echo -e. Otherwise you really need printf for consistent behavior on all platforms, but that's an external command in bash, so echo -e is correct and faster in this case.
Jan
18
revised Byzantine behaviour in shell script
added 369 characters in body
Jan
18
comment Byzantine behaviour in shell script
+1. Tilde definitely needs escaping. Also agree there would be simpler ways to write this.
Jan
18
answered Byzantine behaviour in shell script
Jan
18
comment Ubuntu: Linux can browse sites, bash can't even resolve the dns name - Huh!
Yes, hence the question. :-)