hi everyone, I want to ask something for the following file: file1:
909
919
929
932file2:
909 9
929 9output:
919
939How can I do it in shell scripting. It cant be in diff, because diff is in line by line method. please assist, thanks for advance..
Here are two links that discuss reading a file line-by-line: http://www.computing.net/answers/un...
http://www.computing.net/answers/un...
thanks, i need character by character.. not line by line.. and the length of each line.. so other character cant be read..
Do you know that you can parse the 2 fields this way: while read f1 f2 do echo $f1 # line 1, col 1 equals 909 echo $f2 # line 1, col 2 equals 9 done < file2Anyway, here is an example that cycles thru a file, finds each line's length and looks at certain characters using the cut command:
http://www.computing.net/answers/un...
Maybe you can modify it to fit your needs.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |