LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2010, 05:03 PM   #1
wasamzy
Member
 
Registered: Apr 2009
Location: Ghana Accra
Posts: 64

Rep: Reputation: 15
Exit Code


Hi All,

I have written a script that is being invoked from procmail. Now I want procmail to wait untill the program finishes and check it's exitcode.

My question is, how do I check the exit code of the script and take an action on it in procmail?

Regards

Emanuel
 
Old 11-26-2010, 03:11 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
You can try to run the script yourself like this:

./scriptname; echo $?

echo $? will give u the exit code which ./scriptname returned on exit.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What does tar exit code 2 mean Robert S Linux - Software 4 04-20-2012 08:34 PM
Exit Code 204 Tim Johnson Linux - General 5 04-25-2006 01:59 AM
Exit Code: 7 dbzw SUSE / openSUSE 0 12-21-2004 01:06 PM
exit code 2 -- pppd eduac Linux - Software 3 11-21-2003 05:19 AM
pppd exit code 16 ksgill Linux - Newbie 8 07-12-2003 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration