Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Korn and Bash shells use [ .. ] as a shorthand for test .., so it would be unwise to use those characters.

    Odd, not from my the bash on my box, and not in a script either.[0]

    This was giving me a little trouble before though, more for consistency with find(1) than anything, so I switched it over to using '(' and ')' as parameters. The hard part is finding a set of grouping characters that aren't significant in any shell, since () themselves are used by bash and zsh.

    [0]

    bash-2.05a$ ls [ foo ]
    ls: [: No such file or directory
    ls: ]: No such file or directory
    foo
    bash-2.05a$ cat foo
    #!/bin/bash
    ls [ foo ]
    bash-2.05a$ ./foo
    ls: [: No such file or directory
    ls: ]: No such file or directory
    foo