Shell hell

Oct 28, 2006 14:03

Dear Log,
Shell quoting hurts my brain:
% cat args #!/usr/bin/perl # Show what arguments we've been given if(@ARGV) { print "\t", (@ARGV == 1) ? "1 argument:\n" : (@ARGV . " arguments:\n"), map "\t\t«$_»\n", @ARGV; } else { print "Zero arguments.\n"; } % args "a b" c 2 arguments: «a b» «c» % cat passing-along- ( Read more... )

unix, shell, zsh, csh, sh

Leave a comment

Comments 2

pne October 29 2006, 13:22:43 UTC
Now play around with setting IFS to something else (specifically, something that doesn't contain \x20).

*shrugs* Shell quoting makes spaces significant, and the rest is for hysterical raisins.

Reply

hhhhhh torgo_x October 29 2006, 23:40:05 UTC
Oh man. That idea hurts like a kidney stone.

Now, I'm not saying I'd use Scheme as a shell-- but now I reaaaally understand what makes
people want to do that!

Reply


Leave a comment

Up