On 12/22/11 9:24 PM, Peng Yu wrote: > "If no arguments follow this option, then the positional parameters $@ > are unset. Otherwise, the positional parameters $@ are set to the > args, even if some of them begin with a -."
Not to put *too* fine a point on it, but this is completely wrong. You appear to be throwing `$@' in there randomly because you want to search for that string. The name of the parameter is `@', just as the name of the HOME environment variable is `HOME'. It's value is dynamic -- the current set of positional parameters. You use `$@' to dereference it. Look at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_01 for more information. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/