From: Michael D. Lowis Date: Wed, 1 Feb 2017 13:47:03 +0000 (-0500) Subject: Added rc function to add line numbers to a document X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=d7ce44d10e1e4059c42b95196ae55a69483d896b;p=projs%2Ftide.git Added rc function to add line numbers to a document --- diff --git a/editrc b/editrc index 4d76221..69d2ded 100644 --- a/editrc +++ b/editrc @@ -28,8 +28,7 @@ ucmt(){ sed -e 's/^#//'; } etabs(){ sed -e 's/\t/ /g'; } # Add a line number to each line of the file -lnnum(){ sed -e = | sed -e 'N;s/\n/\t/'; } -nolnnum(){ sed -e 's/^[0-9]\+\t//'; } +lnnum(){ nl -nln -ba; } # Trim trailing whitspace trim(){ sed -e 's/[\t ]\+$//'; }