First will print line No if numericaly equal or string equal, second only for lines with equal numbers
perl -ne 'print $. if /^(.+)\s+\1$/' perl -ne 'print $. if /^(\d+)\s+\1$/'
Cheers,
R.
In reply to Re: printing line number
by Random_Walk
in thread printing line number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |