The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Add single quotes in string mrjunsy UNIX for Dummies Questions & Answers 1 07-18-2008 07:09 AM
Awk:Find length of string omitting quotes jayakumarrt Shell Programming and Scripting 2 05-09-2008 12:48 AM
simple question on string concat the_learner High Level Programming 2 08-23-2007 08:09 PM
problem with single quotes in a string and findbug bob122480 Shell Programming and Scripting 9 01-19-2007 08:38 AM
concat string mpang_ Shell Programming and Scripting 1 07-25-2006 03:03 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 07-23-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Doing your own parsing of the arguments is usually not a good idea. Is there a particular reason you want to loop over the arguments and collect them into a single string? If keeping quoting etc. intact is important, the "$@" construct is exactly for that, but then e.g. editing out some of the command-line arguments and passing on the rest is tricky. (Shifting off the first argument is of course always simple and straightforward.)
Reply With Quote
Forum Sponsor
  #9  
Old 07-24-2008
Registered User
 

Join Date: Jul 2008
Posts: 4
Hi era,

If i have something like ./example.sh does "this" work

If I echo "$@" then this outputs. does this work

i have tried using the shift but that's give the same problem because the $@ has already removed the quotes. Is there anyway of getting exactly what was inputted in from the above example without actually modifying the command parameter with escape characters.

Many thanks for your help
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0