RE: Using mailx
Posted in 2000
Not really an Informix problem, but .. you don't appear to be cat'ing anything, the cat/cut line doesn't appear to cast back into kod, missing ` ? you cast into X then don't use it and in the mailx you have nested quotes any one of which will blow the script, oh and the shell you are running in would be useful > -----Original Message----- > From: Ilhan Erden [mailto:ilerden@ea-dc.dhl.com] > Sent: Wednesday, November 29, 2000 07:56 > To: Informix > Subject: Using mailx > > > Hi > > I'm trying to use mailx command within a cron script but it doesn't > work. > The script grabs the e-mail address field from the "weekly_check" > file > (8 th field) and moves it to the variable "kod". > After that it should run mailx to the receiver "kod". > > if [ -s "/home/it/hq/internet/weekly_check" ] > then > for X in /home/it/hq/internet/weekly_check > do > kod=cat | cut -d"|" -f8 /home/it/hq/internet/weekly_check > mailx -s "Internet Weekly Warning Report $(date "+%d/%m/%y > %H:%M") " $kod@forex.com < > /home/it/hq/internet/formatted_int_report.txt > done > fi > > Here is a sample : > > weekly_check file : > > 746|YKK METAL PLASTIK|FETE|THASU|80065|x|FBAKYKK|W06|23/03/2000| > 862|OTOMOT YA |NLIK|CAESF|22356|e|eraf34d|BS2|31/03/2000| > ^ > This field is the > kod. > The Shell output is this : > W06 > BS2 > @forex.com... user address required > > It seems that it doesn't recognise the e-mail address. > > Cheers >