简体   繁体   中英

cv maillist script


I've been trying to send many cv at once. But my script doesn't work. The getrow program works well -> parse a cv file
Any idea?

EDIT5 :

I was stupid. I forgot that my variable was not i
Here is my revised code (that still doesn't work).
Do you know how to increment $var0?

#!/bin/bash

path=~/tests/project_mall
vc=$path/scurricula.pdf
tiv=$path/smotiv.pdf

index=0
LIMIT=$(getrow $1)

while [ "$index" -lt "$LIMIT" ]
do
    (mail1_s $(getrow $1 $index 1) $(getrow $1 $index 2) ; uuencode $vc $vc ; uuencode $tiv $tiv) | mailx -s "candidature spontanèe" $(getrow $1 $index 0)
    echo -n "mail number $index has been sent" ; echo
    sleep 7
    let "index+=1"

done

exit 0

EDIT6 : solved, i deleted the output because it contained my mail.
The script above has been edited and works. See ya.

对我来说,这似乎是一个问题$var0++ ,请尝试var0 = $var0 + 1来更新值。


So the answer is simple. To increment the while loop, you use let index+=1 with index the variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM