© 2005 A.P. Lawrence
False
The second will fail, complaining "/bin/ls: invalid option -- "
It's the same as typing "ls '-l -R'" at the command line: the arguments get passed as ONE argument and "ls" gets confused. This is the kernel at work, not the shell. When it sees "#!", the first token after that becomes the pathname to be executed, and the rest is packed into argv[1] (argv[2] is the script filename).
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
/Tests/Linux/e0880.html copyright Tony Lawrence All Rights Reserved
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 1 | 5 | 27 | 473 | 875 |
Fri Sep 19 10:41:09 2008 anonymous
Website:
i tried this on terminal and both are working fine
Add your comments