Operating System - HP-UX
1833174 Members
3165 Online
110051 Solutions
New Discussion

shell scripting question -- nested mail and ftp statements

 
SOLVED
Go to solution
Ted Mims
Occasional Advisor

shell scripting question -- nested mail and ftp statements

I have run into an interesting problem and was hoping that you might could shed some light.? Below is an example of code followed by the error generated.

put $OUTST
RC=$?

if [ "$RC" -ne 0 ]
then
??????? echo "sample text"
??????? mail tmims@mutualdrug.com <
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: shell scripting question -- nested mail and ftp statements

Hi Tim,

This one is easy. You have whitespace in front of your '!'. Move the '!' all the way to the left and all will be well.

Regards, Clay
If it ain't broke, I can fix that.
Javier Ortiz Guajardo
Frequent Advisor

Re: shell scripting question -- nested mail and ftp statements

once i have a problem with de >>? and this is what i did.

I put the lines vit >>' and ? at the beginning of the line and the shell works fine.
put $OUTST
RC=$?

if [ "$RC" -ne 0 ]
then
echo "sample text"
mail tmims@mutualdrug.com <
The obstacles are those things that the people see when they left to see their goals.
Javier Ortiz Guajardo
Frequent Advisor

Re: shell scripting question -- nested mail and ftp statements

you can replace the lines
mail tmims@mutualdrug.com <
The obstacles are those things that the people see when they left to see their goals.