![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| command line args | skooly5 | UNIX for Dummies Questions & Answers | 2 | 04-06-2008 07:46 PM |
| Command line args | enuenu | High Level Programming | 2 | 05-29-2007 12:19 AM |
| alias with args how to ... | umen | UNIX for Dummies Questions & Answers | 4 | 12-28-2005 07:47 AM |
| required command line args | yoi2hot4ya | UNIX for Dummies Questions & Answers | 6 | 06-02-2005 06:50 PM |
| Args to Array | Shaz | Shell Programming and Scripting | 2 | 06-30-2003 04:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
command line args 2
I have this while loop and at the end I am trying to get it to tell me the last argument I entered. And with it like this all I get is the sentence with no value for $1. Now I tried moving done after the sentence and it printed the value of $1 after every number. I don't want that I just want the last argument entered.
while [ $# -gt 0 ] do echo "$#" shift sleep 1s done echo The last command line argument you entered is $1. can anyone help? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|