Last active
December 28, 2015 19:08
-
-
Save AndrewRussellHayes/7547721 to your computer and use it in GitHub Desktop.
replace file with file name and the entire contents get printed with line numbers to screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#replace file with file name and the entire contents get printed with line numbers to screen | |
perl -n -e 'print "$. - $_"' file | |
#or | |
perl -p -e '$_ = "$. - $_"' file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment