Hi All,
I have a to read a file and put the result in one line. The i am reading from contain the data like below.
1 signifies the beging of the new line.
Hi All,
I have a to read a file and put the result in one line. The i am reading from contain the data like below.
1 signifies the beging of the new line.
You mean you have to put all the lines in a file to a single line?
echo $(cat file)
Yes, if i can have them in a variable then i be done.
RESULT=$(echo $(cat file))
Thanks, but how can I ve the result in one line. in the sample data supplied. i would want to have 1 to signifie the beginging the a new line(\n)
---------- Post updated at 03:09 PM ---------- Previous update was at 02:54 PM ----------
i have sumthing like ths bt cant work
nawk -F, '$1==1 {printf (FNR==1)?"":ORS} {printf $0}' myFile
Thanks, this worked.