© 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.
Add your comments