Advertisement

07.22.2008 at 08:11AM PDT, ID: 23585391
[x]
Attachment Details

shell script printing the errors to t file

Asked by saibsk in KornShell (ksh)

I have bunch of commands in a shell script e.g
ls -ltr /export/home/user/clients/$clientDir > $HOME/user.out

which I am outputting to a file. But when the command fails even that I want to output to the same file. But now when the command fails it outputs the error to the file it just prints to the console. Please advise.Start Free Trial
[+][-]07.22.2008 at 08:40AM PDT, ID: 22060584

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 08:59AM PDT, ID: 22060781

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 09:13AM PDT, ID: 22060922

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: KornShell (ksh)
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628