]> git.mdlowis.com Git - projs/tide.git/commitdiff
Added rc function to add line numbers to a document
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 1 Feb 2017 13:47:03 +0000 (08:47 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 1 Feb 2017 13:47:03 +0000 (08:47 -0500)
editrc

diff --git a/editrc b/editrc
index 4d76221c12ae9f757c0a9288cb1df5d5dd89fc70..69d2dedd2418655ca48f6124c2991d7e1fd5bcc4 100644 (file)
--- 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 ]\+$//'; }