开发者

cv maillist script

开发者 https://www.devze.com 2023-04-06 06:17 出处:网络
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

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
    (m开发者_运维问答ail1_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.


To me this looks like a problem $var0++, try var0 = $var0 + 1 to update the value.



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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号