![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | 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 !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 06:24 AM |
| Simple to you not simple to me pattern matchin help | aleks001 | Shell Programming and Scripting | 0 | 07-22-2007 07:06 PM |
| Ok simple question for simple knowledge... | Corrail | UNIX for Dummies Questions & Answers | 1 | 11-28-2005 09:03 AM |
| Simple Search and Replace - Revisited | Brandt | Shell Programming and Scripting | 1 | 04-23-2004 07:45 AM |
| Simple? Search replace | Brandt | UNIX for Dummies Questions & Answers | 9 | 01-16-2004 09:51 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
| Forum Sponsor | ||
|
|
|
||||
|
clarification
Ok I have thought of a way to clarify my question.
my last argument from many will be a filename say I have a script Code:
touch /tmp/$# Whilst I'm not surprised by this, how can I change it so that $# doesn't give me the number of arguments, but the argument at position $# Hope that clears things up. Mitch. |
|
||||
|
Quote:
(5) Search the forums database with your keywords before asking. Had you searched the forums maybe you have found printing last argument in shell script or one of the dozens of other threads that answer your question. Please give the search function a try next time. |
|
||||
|
Thanks for the reply. Although I'm sure you wont believe me, I read the rules before I posted.
After posting the question I realised that it wasn't clear. In the example I used above, I was after the last argument (which the thread you suggested does show how to do) but my question was as per the second article. That is to say it could be anywhere within the argument list. If i were to search, the terms I would be using would be position, argument, file, all terms ubiquitous to most threads. That is why i chose against searching. Thanks for your response. Mitch. P.S. I am a nice guy, and understand where you are coming from. I know from experience what it is like partaking in forums where people ask questions that have been asked a hundred times before. I didn't just ignore the search feature off the cuff. Sorry if I pi**ed you off. Last edited by spudtheimpaler : 10-21-2006 at 10:16 AM. |
||||
| Google UNIX.COM |