Advertisement

03.29.2008 at 03:36AM PDT, ID: 23279253
[x]
Attachment Details

Capture exit codes from <, doesn't seem to be the same as pipe |

Asked by modell in Linux, Linux Programming

Tags: fedora, linux

I have the following code, neither the $PIPESTATUS nor the if command seem to return the exit code of procmail, presumably they are returning the status of the '<' bit.

In short I want to check if a mail was sucessfully processed by procmail, and delete it if it was.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
SENTDIR=$HOME/$DOMAIN/sentmail/new/
 
 
        for FILE in `ls $SENTDIR`
        do
                /usr/bin/procmail  < $SENTDIR$FILE
                echo $PIPESTATUS
                if [ "$?" -eq  "0" ]
                        then
                                echo 'OK      - ' $FILE
                                rm $SENTDIR$FILE
                        else
                                echo 'FAILED  - ' $FILE
                fi
        done
d
[+][-]03.29.2008 at 03:47AM PDT, ID: 21236114

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.

 
[+][-]03.29.2008 at 06:26AM PDT, ID: 21236434

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.

 
[+][-]03.29.2008 at 06:41AM PDT, ID: 21236492

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.

 
[+][-]03.29.2008 at 03:39PM PDT, ID: 21238439

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.

 
[+][-]03.29.2008 at 11:52PM PDT, ID: 21239864

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.

 
[+][-]03.30.2008 at 02:04AM PDT, ID: 21240065

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.

 
[+][-]03.30.2008 at 02:22AM PDT, ID: 21240095

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.

 
[+][-]03.30.2008 at 05:19AM PDT, ID: 21240440

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.

 
[+][-]03.30.2008 at 05:20AM PDT, ID: 21240442

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.

 
[+][-]03.30.2008 at 05:24AM PDT, ID: 21240449

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.

 
[+][-]03.30.2008 at 01:36PM PDT, ID: 21241854

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.

 
[+][-]03.31.2008 at 01:04AM PDT, ID: 21243808

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.

 
[+][-]03.31.2008 at 02:42AM PDT, ID: 21244145

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.

 
[+][-]03.31.2008 at 03:04AM PDT, ID: 21244205

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.

 
[+][-]04.24.2008 at 08:40AM PDT, ID: 21432086

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.

 
[+][-]04.24.2008 at 01:59PM PDT, ID: 21435085

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.

 
[+][-]04.24.2008 at 02:32PM PDT, ID: 21435340

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

Zones: Linux, Linux Programming
Tags: fedora, linux
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.27.2008 at 01:42PM PDT, ID: 21450320

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.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628