Well, it's not that the cut command doesn't work. It does what I don't want it to do. Or, I should say, that I should trim the file first.
Your suggestion alister works in the same way my original cut command worked. It does however get rid of stuff I need to stay in the file.
Sorry, I should add that there is also more lines of the pattern that has more fields, i.e.:
Quote:
root@#####: #####: /opt/dba/results/res03301.r: need to remove
As you can see these lines contain one additional column, so they are different than the rest of the lines in the file. most contain three columns delimited by a colon. This one has an additional column delimited by a colon, and that is why the cut and awk command display what I don't want them to.
I would like to get rid of the first column, initially. Then get rid of the lines containing different number of columns.
So this is kind of what I need to get to be able to do:
- I need to get rid of the first column.
- I would like to delete a pattern (the second set of #### on the lines that are 4 fields instead of three delimited by colons) from every line that contains it.
- I would actually like to keep the patterns "need to update", "need to remove" located on the 3-rd column initially for identification purposes before deleting them.