[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug with script
From: |
Jürgen Kahrs |
Subject: |
Re: bug with script |
Date: |
Mon, 06 Aug 2001 14:33:51 +0200 |
This one should do the basic i/o:
#!/usr/bin/ksh
while sleep 1;
do
echo "Please provide three arguments"
echo 'The format should be length(cm/in) volume(ga/li) temperature(C/F)'
echo "Note: Insert a space between each set of value."
read inputentered
echo "$inputentered" | awk '
{if (NF != 3) next;
print "lenth =", $1, "volume =", $2, "temperature =", $3
}'
done
> You might wish to read up a bit on awk programming. I recommend
> http://www.oreilly.com/catalog/awkprog3, but I'm biased.
A good book, really. But I am also biased.
______________________________________________________________________
Juergen Kahrs Tel. 0421 249 666
Millstaetter Strasse 15 Tel. 0421 94906-203
D 28359 Bremen Fax 0421 94906-299
_________________ http://home.vr-web.de/Juergen.Kahrs ________________