![]() |
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 |
| How to fix :[too many arguments error in code | Brewer27 | UNIX for Dummies Questions & Answers | 2 | 05-18-2008 09:42 PM |
| binary operator expected error | apps_user | Shell Programming and Scripting | 7 | 05-11-2007 08:33 PM |
| ERROR-> test: argument expected , what does it mean? | tan102938 | Shell Programming and Scripting | 4 | 09-22-2006 12:20 AM |
| Facing test: argument expected ERROR | rkrgarlapati | Shell Programming and Scripting | 5 | 07-20-2006 09:26 AM |
| Syntax Error: 'else' is not expected | djschmitt | Shell Programming and Scripting | 6 | 11-12-2002 11:28 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
arguments expected error
ive implemented getopt for the command line but have this problem,
Code:
#!/bin/sh text="" set -- getopt "t" etc .... #sets arguments while : do case "$1" in #gets arguments -t: shift; text="$1" ;; shift done shift if [ $text = "" ] then echo "no text" else echo "text" fi it prints "text" but when i just run ./script it returns a "arguments expected" message, (shouldnt it return "no text" ?) is there a way to fix this, i want to be able to run ./script without it complaining as well as ./script -t <text> |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|