[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
help with parallel input as option param?
From: |
Mathias Korber |
Subject: |
help with parallel input as option param? |
Date: |
Mon, 12 Feb 2018 22:38:25 +0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
I want to run up to 4 parallel 'offlineimap' commands to collect email
from a number of accounts.
However, when I run the below script, the output dir
${BASEDIR}/logs/${DATE}
gets created with a subdir '1' below it but output from the
jobs is sent to stdout.. What am I doing wrong?
I think one thing is that the command to be run
wants the config filename passed in an option '-c'..
Could this be the issue?
I use this script:
----------- snip --------------
#!/opt/local/bin/bash
P=/opt/local/bin/parallel
UI=basic
#UI=quiet
OFFL="/opt/local/bin/offlineimap"
FIND="/usr/bin/find"
DATE=$(date +%F:%T)
BASEDIR="${HOME}/.offlineimap"
OUTDIR="${BASEDIR}/logs/${DATE}"
JOBLOG="${OUTDIR}/joblog"
CONFIGDIR="${BASEDIR}/config/"
CONFIGSUFFIX="oi"
JOBS=4
REPEAT=3
cd ${CONFIGDIR}
# CONFIGS=$(${FIND} . -name "*.${CONFIGSUFFIX}" -print)
${FIND} . -name "*.${CONFIGSUFFIX}" | ${P} --jobs ${JOBS} \
--results "${OUTDIR}" ${OFFL} -u "${UI}" -c {/}
----------- snip --------------
Here is the output on the tty where I run this..
$ sh -x ./offlineimap-parallel
+ P=/opt/local/bin/parallel
+ UI=basic
+ OFFL=/opt/local/bin/offlineimap
+ FIND=/usr/bin/find
++ date +%F:%T
+ DATE=2018-02-12:22:20:19
+ BASEDIR=/Users/mathias/.offlineimap
+ OUTDIR=/Users/mathias/.offlineimap/logs/2018-02-12:22:20:19/
+ JOBLOG=/Users/mathias/.offlineimap/logs/2018-02-12:22:20:19//joblog
+ CONFIGDIR=/Users/mathias/.offlineimap/config/
+ CONFIGSUFFIX=oi
+ JOBS=4
+ REPEAT=3
+ cd /Users/mathias/.offlineimap/config/
+ /usr/bin/find . -name '*.oi'
+ /opt/local/bin/parallel --jobs 4 --res
/Users/mathias/.offlineimap/logs/2018-02-12:22:20:19/
/opt/local/bin/offlineimap -u basic -c '{/}'
OfflineIMAP 7.1.5
Licensed under the GNU GPL v2 or any later version (with an OpenSSL
exception)
imaplib2 v2.57 (bundled), Python v2.7.14, OpenSSL 1.0.2n 7 Dec 2017
*** Processing account geocachingKoerberOrg
Establishing connection to imap.googlemail.com:993
(geocaching-koerber-org-gmail-remote)
Syncing [Gmail]/Starred: Gmail -> Maildir
Syncing [Gmail]/Sent Mail: Gmail -> Maildir
Syncing [Gmail]/Important: Gmail -> Maildir
Syncing [Gmail]/Drafts: Gmail -> Maildir
I expected to get individual output files under
OUTDIR=/Users/mathias/.offlineimap/logs/2018-02-12:22:20:19/
I see no 'debug' or 'verbose' option that could tell me what
input parallel uses..
Any help would be appreciated.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- help with parallel input as option param?,
Mathias Korber <=