apl logo

A.P. Lawrence

Information and Resources for Unix and Linux Systems
Bloggers and the self-employed
RSS FeedsGet APLawrence.com by RSS




Linux Skills Test

© 2005 A.P. Lawrence

Answer


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).

Comments /Tests/Linux/e0880.html


Fri Sep 19 10:41:09 2008   anonymous

Website:
i tried this on terminal and both are working fine


Add your comments


Next question
Return to Question q0880

Related Articles

Have you tried Searching this site?

Please read this disclaimer

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
1527473875
Paid Advertisers

Cingular cell phones  -  Advanced Cisco Networking and Security by Vinci Consulting  
Data Recovery Software  -  Internet Advertising  -