while read line strange output -
I have a script that reads the file line through the line There are several columns with many spaces in each row, such as: 1 A1b1c1d2d2a2b2c2d3a3b3c3d
I want to work on the first column of each row. I have a script:
#! / Bin / sh file_name = myfile.txt while the reading line is = `cut-d '' echo 'f1` is" ve ve "done & lt; $ File_name
but output is:
instead of 1a 2a 3a
this is 1a 2a this is 3a
your first Example of cut
is all input account.
You probably meant it
ve = `echo" $ line "| Cut-D "" -f1`
I recommend that you cite your variable well:
#! / Bin / sh file_name = myfile.txt while reading the line; Do = "resonant" line "| Cut-d '' -f1` echo 'this $ ve "done and lieutenant; "$ File_name"
Comments
Post a Comment