I have input file which is pipe delimited
A | 1
B | 2
c | 3
I need output of displaying total number of lines in a file as last column.
A | 1 | 3-----total number of linesin file.
B | 2 | 3
c | 3 | 3
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line) from the file. As the file contains thousands of lines, I need to find a way that can be done easily.
i have following code that gives me output as number of lines and words in a file. how can i use one more FS(file separator) that can be used to count total characters.??
(the output should be same as wc file command )
print "Total no of Lines:"l;
print "Total no of words:"w;