The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-27-2006
wisher115 wisher115 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 18
Question telnet and background ?

I have an issue i'm trying to resolve. It's a ksh script.
When i use this " & " after the telnet command i get output to my screen. I see what is going on, but i don't get anything sent to the dump2 file.
If i don't use it i get info sent to dump2 file and grep finds the data.
Is there a way it can work both ways. How would it look?

) | telnet > /usr/autoprog/prod/rob/dump2
sleep 3
grep -h c12k-fpd-pkg.120-32.S3.pkg < /usr/autoprog/prod/rob/dump2
rcode=$?
echo "$rcode"

Thanks.