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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Major OS errors/Bash errors help!!!! wcmmlynn UNIX for Dummies Questions & Answers 12 11-13-2007 04:50 AM
Adapter Errors and Link Errors mcastill66 AIX 2 08-02-2005 06:51 PM
Adapter Errors and Link Errors mcastill66 UNIX for Advanced & Expert Users 0 08-02-2005 06:11 PM
trapping errors while using FTP. radhika Shell Programming and Scripting 5 05-27-2005 07:55 AM
ftp error trapping dhawkjrscripter UNIX for Dummies Questions & Answers 1 04-15-2005 04:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2008
TimHortons TimHortons is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 53
Smile trapping errors

I am using unixs script to submit programs (SQRS) and need to trap any time of error that is received once the job finishes.

Examples of the type of errors I am getting

Error! SQR Failed To Process
mkdir: Failed to make directory

These are showing up in a log file but I do not want to have to grep on the log file for every possible text string.

I am new to unix , although I have had exposure in the pass to it. Would welcome direction and help in how to code for errors.
  #2 (permalink)  
Old 11-19-2008
TimHortons TimHortons is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 53
I meant any type of error in my message.
  #3 (permalink)  
Old 11-19-2008
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,909
You need to be more specific about what you're doing, please.
  #4 (permalink)  
Old 11-19-2008
TimHortons TimHortons is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 53
Okay, I want to trap any system error messages that may occur within a unix shell script. When I do a mkdir command and it fails how to trap the error.
When my sqr program fails with "Error! SQR Failed To Process" how to trap the error and exit the shell script with an exit 99
Sponsored Links
Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0