[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sheflug] sed Help



Hi
I have a text file which needs a common string appending to the beginning of
every new line.  I'm sure sed would be my friend here but I'm afraid i dont
speak the same language - yet -.

eg.  

string = "/mnt/home/aland/"

oldfile.py looks like 

dontmeanathingifitaintgotthatswing.mp3
bitchesbrew.mp3
giantsteps.mp3

I would like newfile.py to look like

/mnt/home/aland/dontmeanathingifitaintgotthatswing.mp3
/mnt/home/aland/bitchesbrew.mp3
/mnt/home/aland/giantsteps.mp3

I'm sure that 
cat oldfile.py | sed a\"/mnt/home/aland/"\ ............... 
must be in the right direction but can any one help.

TIA

Alan dawson


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.