in reply to One liner to S & R by column
What have you tried?
perl -pli.bak -e '$. != 1 and substr($_,18, 1) =~ tr/Y/H/;' filenameHere's how to read it:
perlrun, perlintro, and perlop should contain 99% of what you need to learn to get a good start on the next one-liner yourself.
Update: Added play by play explanation.
Update2: Fixed issue where files aren't zero-indexed with respect to $. (Thanks Jim,Laurent_R)
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One liner to S & R by column
by Jim (Curate) on Dec 23, 2013 at 17:54 UTC | |
by davido (Cardinal) on Dec 23, 2013 at 18:01 UTC | |
by Laurent_R (Canon) on Dec 23, 2013 at 18:51 UTC | |
|
Re^2: One liner to S & R by column
by dirtdog (Monk) on Dec 23, 2013 at 17:15 UTC |