How to use sed to find lines with special characters
Given the following file content:
a|b|c|d|e aa|bb|cc|d|e x|y|z|c|e x|y|c|f|r Tried using the following sed command...but did not work sed "/^.*|.*|c|/p" file The correct output should be: a|b|c|d|e x|y|c|f|r I am tring to find lines where c is in the third position. Any suggestions? Thanks |
do you have to use sed? awk would be a better choice...
Code:
$ cat test.txt Code:
"a|b|c|"d|e |
Not limited to sed will use awk
Thanks for the correction and insight...greatly appreciated...will build on my awk knowledge.
|
All times are GMT -5. The time now is 11:43 PM. |