Re: Quick sed question -- thanks
- From: Stephane CHAZELAS <this.address@xxxxxxxxxx>
- Date: Tue, 25 Apr 2006 09:25:42 +0100
2006-04-24, 12:23(-07), mail4newsgroups@xxxxxxxxx:
[...]
I suck so bad at sed, I won't even try to take this any further because[...]
I suck so much at it. Basically I am in need of a sed statement by
which I can change one line in a script. I am using ksh (on solaris).
Line to change:
#set -x
What to change to:
typeset -ft $(typeset +f); PS4='[$LINENO] '; export PS4
This is my lame attempt, of course it would not work because of the $,
#, ; signs, spaces and all that.
$ sed -e 's/#set -x/typeset -ft $(typeset +f); PS4='[$LINENO] '; export
PS4/g' script.sh > script.sh.tmp
sed: Function s/#set -x/typeset -ft $(typeset +f); PS4=[1] cannot be
parsed.
If you find ksh default debug tracing sucks, you could try
running your script with zsh in ksh emulation mode. It provides
with much more helpful debugging output.
--
Stéphane
.
- References:
- Quick sed question -- thanks
- From: mail4newsgroups
- Quick sed question -- thanks
- Prev by Date: Re: problems with script bash
- Next by Date: Re: counting non-blank lines in files
- Previous by thread: Re: Quick sed question -- thanks
- Next by thread: Re: Quick sed question -- thanks
- Index(es):
Relevant Pages
|