The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2005
Registered User
 

Join Date: Nov 2003
Location: Grimsby
Posts: 17
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?
Reply With Quote
Forum Sponsor
  #2  
Old 05-10-2005
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
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.
Reply With Quote
  #3  
Old 05-10-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
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 ]
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0