Hi,
I have flat file with multiple lines as below
++++++++++++ file_name : test.txt
This is a first row
This is a second row
This is a third row and soon ...
++++++++++++
Is there a way that i can get each line into a variable. I tried with foreach command but i am n't getting it and i'm using C-shell
foreach row in (`cat test.txt`)
set string=$row
echo $string
end
Output was ::
This
is
a
first
row
But i need as a single line "This is a first row ""
Any suggestions and how to get this done >>
Thanks a lot
Kate
I have flat file with multiple lines as below
++++++++++++ file_name : test.txt
This is a first row
This is a second row
This is a third row and soon ...
++++++++++++
Is there a way that i can get each line into a variable. I tried with foreach command but i am n't getting it and i'm using C-shell
foreach row in (`cat test.txt`)
set string=$row
echo $string
end
Output was ::
This
is
a
first
row
But i need as a single line "This is a first row ""
Any suggestions and how to get this done >>
Thanks a lot
Kate