I have file file1.txt
whose contents are as follows:
Date List
-----------
Quarter Date
Year Date
Month Date
Now I want to read the non space elements from each row of file and to write to a variable.
For example for row 2 variable should contain Quarter Year
only after removing space.
I tried:
tail -1 file1.txt > variable1
But it doesn't work.
awk '{$1=$1}1'
– cuonglm Jun 12 '15 at 09:09