Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Scott Black — — source: Informix-list mailing list archive (1991-1998)
How about something like the following (I use it all the time)
#!/usr/bin/ksh
[your code here]
for i in `cat report.txt`
do
mailx -s "Report" $i@host < report.txt
done
-----Original Message-----
From: Ilhan Erden [mailto:ilerden@ea-dc.dhl.com]
Sent: Wednesday, November 22, 2000 4:32 AM
Posted To: informix
Conversation: Export data in order to use it as a variable in shell
Subject: Export data in order to use it as a variable in shell
Hi Gurus
I have a new challenge.
There is a sales_code data field in the database which includes
data which again I want to use as a variable in the e-mail address.
The script should be something like :
---------------------------------------------------------
$INFORMIXDIR/bin/dbaccess account 2>/dev/null 1>&2 <<!
unload to report.txt
SELECT sales_code
FROM account!
mailx -s "Report" sales_code@host < report.txt
---------------------------------------------------------
Thanks in advance...
Ilhan Erden
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.