![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
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.)
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|