Bash script running multiple commands problem?
by shams from LinuxQuestions.org on (#5K4J7)
Hi,
This is a bash script:
Code:#!/bin/bash
for i in 1; do
set -e
cd /home/me/tmp/mail
python3 pop.py &&
./getmail.sh &&
python3 /home/me/tmp/mail/del.py
donerunning pop.py creates rc files for the getmail from mysql database, then getmail.sh retrieve my mails from all defferent acounts to /var/mail/me, these two codes are running ok, when the getmail.sh finished the del.py will delete all the getamil rc files, the problem is the above script didn't run the del.py and exiting, i also tried this code but it has the same problem didn't run the del.py:
Code:#!/bin/bash
set -e
cd /home/me/tmp/mail
python3 pop.py &&
./getmail.sh &&
python3 /home/me/tmp/mail/del.py
This is a bash script:
Code:#!/bin/bash
for i in 1; do
set -e
cd /home/me/tmp/mail
python3 pop.py &&
./getmail.sh &&
python3 /home/me/tmp/mail/del.py
donerunning pop.py creates rc files for the getmail from mysql database, then getmail.sh retrieve my mails from all defferent acounts to /var/mail/me, these two codes are running ok, when the getmail.sh finished the del.py will delete all the getamil rc files, the problem is the above script didn't run the del.py and exiting, i also tried this code but it has the same problem didn't run the del.py:
Code:#!/bin/bash
set -e
cd /home/me/tmp/mail
python3 pop.py &&
./getmail.sh &&
python3 /home/me/tmp/mail/del.py