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

Try:
nl -s " " -b a /path/to/text.file

thanks...
that worked..... kisses

esham

You got the answer. More way to do this as,

awk '{ print NR" "$0 }' <filename>
sed = <filename> | sed 'N;s/\n/ /'

HTH.

cat -b filename
cat -n filename