![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error redirection | sais | UNIX for Dummies Questions & Answers | 7 | 05-15-2008 12:28 AM |
| Java with Unix (Redirection + Piping) | fluke_perf | High Level Programming | 3 | 04-30-2008 08:52 AM |
| Error file Redirection | maxmave | Shell Programming and Scripting | 3 | 04-23-2008 09:17 AM |
| Piping and redirection implementation | mobile01 | High Level Programming | 7 | 12-20-2006 08:52 PM |
| error piping nohup to /dev/null | mochi | Shell Programming and Scripting | 4 | 03-01-2006 10:32 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Redirection or piping error message
I have written a script that appears to work correctly in testing, but is coming up with a starnge error message,
script_name[187]: test: 0403-004 Specify a parameter with this command. Redirection or piping of stdin or stdout is allowed only with -b. (156). The script is run by different functions being called as seen below and the bit it seems to not like is marked in bold. setup_environment if [ -s ${shame_list} ] then rm ${shame_list} fi already_logged_in if [ ${rejection} = yes ] then shame_on_you < $shame_list fi logon A brief run down of the script is that it sets up all the environment variables, them checks to see whether there is a shame_list file and removes it, creates a list of who is logged on, then tries to import this list into a function which pulls out selected in formation. Can anyone shed any light on why the error message is coming up as it has stumped me? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Please post your OS and version, the scripting language, and how you are starting the script (since you state it's working in testing and then immediately state it's getting an error ) both in testing and when it's getting an error.
Also post the script (if possible) - this will assist the folks who can help you. The only info I found on the error was here but I can't tell if that will help you or not. |
|
#3
|
||||
|
||||
|
The second error seems to be related to something called "progress" link.
The first error is related to the old bourne shell test syntax. With code like: if [ ${rejection} = yes ] if the variable "rejection" is not set, the shell will see: if [ = yes ] so you need to use: if [ "${rejection}" = yes ] |
||||
| Google The UNIX and Linux Forums |