BASH question
David C. Chipman
dchipman-rYHPKw+MWrk at public.gmane.org
Sat Dec 15 07:02:47 UTC 2007
Hi Madi,
Could you do this:
-- Start code ---
for QRY_LINE in $(<some-mysql-cli-command>)
do
ROW_NUM=$(echo $QRY_LINE | awk '{ print $1 }")
VAR1=$(echo $QRY_LINE | awk '{ print $2 }')
VAR2=$(echo $QRY_LINE | awk '{ print $3 }')
VAR2=$(echo $QRY_LINE | awk '{ print $4 }')
DATE1=$(echo $QRY_LINE | awk '{ print $5 }')
TIME=$(echo $QRY_LINE | awk '{ print $6 }')
DATE2=$(echo $QRY_LINE | awk '{ print $7 }')
done
-- End code --
I hope this works, but get rid of all the stuff above "Begin DB
results output", if possible. If you can't you're have to grep it out
as a part of "some-mysql-cli-command". Good luck. If I've missed
something, let me know, I'm just a hobbyist at this stuff. Good luck!
-David Chipman
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list