Hello everyone,
I have a text file with a lot of lines, and in each line, there are several columns divided by space character, but the number of columns in each line varies. For example, here is a sample,
--------------------
abc 123 234 456
bsc 3 5 7 9 10 123
yyt 23
--------------------
I want to get a new file based on the existing file, by removing the first column, here is the related output of above sample,
--------------------
123 234 456
3 5 7 9 10 123
23
--------------------
Currently, my program runs on Linux, I am using awk command in my C/C++ program, to print from $2 to $100 by removing the first column of each line (I assume that the number of columns does not exceed 100).
I think my method is somewhat stupid. Does anyone have better ideas of how to utilize awk or sed or some other utility in my C/C++ program to do the same thing?
thanks in advance,
George