LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2009, 04:49 AM   #16
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208

Quote:
Originally Posted by theNbomr View Post
Actually, isn't it the shell that break arguments on whitespace? If I launch a program from a shell, it builds the argc/argv parameters from whatever is specified on the commandline, and passes those to the launched program. The same applies if any other program launches with exec() (in one of its many flavors), another program. The parent builds up the argc/argv parameters, of which any number of argvs may contain whitespace, and those arguments will remain intact when the child process accesses them. I do not know of a single common application that then splits individual arguments on whitespace in the character arrays. Can you name any?
Proper use of quotes and escapes in the shell is a key concept to be learned when shell scripting.
--- rod.
+1 to that
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a "fixed-space"-a folder that is EXT2 inside and whatever size-50MB? linus72 Linux - Newbie 3 04-08-2009 08:47 AM
Displaying "Subscribed Threads" -> new folder "All Folders" JZL240I-U LQ Suggestions & Feedback 5 06-15-2007 06:36 AM
How to issue "ls" command start with the largest file size in a folder? fjkum Linux - Newbie 5 07-27-2006 03:28 AM
"rm -rf /tmp", now Evolution shows "(no folder displayed" Ed-MtnBiker Linux - Software 7 04-10-2006 04:05 PM
"Mount" a folder into my ftp folder ? 0001001 Linux - General 3 11-27-2005 04:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration