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

Re: [Sheflug] sed Help



And Lo! The Great Prophet " Chris Butler" uttered these words of wisdom...
>
> One way to do it:
>
> cat oldfile.py | sed s,^,/whatever/,
>

And for those that read comp.unix.shell, this is eligable for a UUOC
award[1] :) It could be written either as:

        sed 's,^,/whatever/,' < oldfile.py

or even:

        sed 's,^,/whatever/,' oldfile.py

And yes, I'd quote the sed operation for safety. Probably doesn't need it
though.

And I see most people decided to go through perl though. Don't many people
know the traditional tools of sed and awk any more? :) </rhetorical>

Chris...
[1] Useless Use Of Cat - often given out on CUS in instances such as these.

-- 
\ Chris Johnson                 \
 \ cej [at] nightwolf.org.uk          \
  \ http://cej.nightwolf.org.uk/  ~-----------------------------------+
   \ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____



___________________________________________________________________

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

  GNU the choice of a complete generation.