The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-06-2005
esham's Avatar
esham esham is offline
Registered User
  
 

Join Date: Nov 2004
Location: INDIA
Posts: 107
add line numbers

Hello..

I have got one file ...
I want to add line numbers with space form starting to ending..

for example...if the file is
--------------------------

sand sorcd 2345 345
recds 234 234 5687
yeres 568 988 erfg4 67

--------------------------
I need the output

----------------------------
1 sand sorcd 2345 345
2 recds 234 234 5687
3 yeres 568 988 erfg4 67
------------------------------

please help..
thanks in advance
esham