RE: Quick Help...Shell script...
Posted in 2000
try
cat TABLE.OUT |&
while read -p LINE
do
echo $LINE
done
> -----Original Message-----
> From: Prasad Mahale [mailto:gs0528@hotmail.com]
> Sent: Wednesday, August 23, 2000 10:10
> To: informix-list@iiug.org
> Subject: Quick Help...Shell script...
>
>
> Hi All,
> Pl help me to complete this shell script..
>
> I have a file - TABLE.OUT
> create table patient
> (
> med_rec_num char(20) not null ,
> last_name char(25) not null ,
> first_name char(15),
> initial char(1),
> ...>
> If i say -
>
> for i in `cat TABLE.OUT`
> do
> echo $i
> done
>
> It displays result as -
> create
> table
> patient
> (
> ...
>
> I want variable i to hold one line at a time instead of one word.
> e.g. i="create table patient"
>
> I am expecting output like-
>
> create table patient
> (
> med_rec_num char(20) not null ,
> last_name char(25) not null ,
> first_name char(15),
> ...>
> I want to process each line further in shell. (not in awk!)
>
> Any trick?
>
>
> Thanks
> Prasad
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ______________________________________________________________
> ___________
> Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.