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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output not to screen

Status
Not open for further replies.

roamer762

MIS
Aug 16, 2002
26
MT
Hello,

I am using csh and am sending output to a file with the prints command.However first I see the output on the screen. Is there a way how to see the output only in required file and not on screen.

printf "\n\n\n\t JOB $list\n" >>file2.

Used the printf command since I had to use tabs.

Thanks


 
Hi,
What switches are you using on your csh script. For debugging purposes I normally use

#! /bin/csh -xv

where the 'v' stands for verbose and the 'x' says show me every line after you do the substitution.

I always remove the -xv before releasing the script for real.


Also remember you specified >> which is append STDOUT to file2. STDERR is going to go to the screen. If you want them both in your file you need to specify

>>& file2

where >> represents STDOUT and the & represents STDERR.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top