This command is to get the duplicated row/line out of a text stream:
more text.txt | uniq -d
Published with Blogger-droid v2.0.4
Just when I have time ;)
This command is to get the duplicated row/line out of a text stream:
more text.txt | uniq -d
This is the command to print a defined column out of a text stream which has pipe "|" separator.
example, given a text stream example.txt of:
test1|column 1 | row 1
test2|column 1 | row 2
test 3|column 1 | row 3
Need to extract to:
column1,row1
column1,row2
column1,row3
The command is:
more example.txt | awk 'BEGIN {FS="|"} {print $1 "," $2}'