![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| command line arguments | skooly5 | Shell Programming and Scripting | 1 | 04-07-2008 03:49 AM |
| arguments in command line | rrs | UNIX for Dummies Questions & Answers | 6 | 07-28-2006 06:44 AM |
| command line arguments | bankpro | High Level Programming | 3 | 02-02-2006 11:12 AM |
| Command Line Arguments | roba909 | UNIX for Dummies Questions & Answers | 7 | 01-19-2006 01:46 PM |
| Parsing the command line arguments | jayakhanna | UNIX for Advanced & Expert Users | 7 | 12-17-2003 07:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Bash: Reading 2 arguments from a command line
If no arguments are entered I wanna be able to read 2 arguments, i have done like this but it doesnt work:
x=0 until [ $x -eq 1 ] #loop starts do if [ $# -eq 0 ]; then echo No arguments were entered, please enter 2 arguments. read $1 $2 elif [ $# -gt 2 ] || [ $# -lt 2 ]; then echo $# arguments were entered, please enter 2 arguments. read $1 $2 else x=1 fi done How can i fix it? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|