Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script’s output to /dev/null 1

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

I have the following script which currently sends its output to stdout. We would like to send the output to /dev/null.

Is it possible?

cat << END | ftp -n -v server_name
user user_name password
lcd l_dir
cd dir

mget `date +%y%m%d`*

bye
END

Thanks,
Dan
 
Dan,
The easiest way would be to designate the output when you call the script. For example, given some script called runscript.sh:

$ runscript.sh 2>&1 > /dev/null

2> (redirect standard error) &1 (into stdout) >/dev/null (both into /dev/null)

Cheers,

Keith
keith@duffin.org
 
Thanks Keith, here is a star going your way.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top