Sed - substitution for whole string

Hello

I have several files where a string similar to this appears:

/home/workload/bin/ProcDly/scrpts/T54.sh > $LOG

I need to change it to something like this:

$VARIABLE > $LOG

However, due to the configuration of the rest of the files, I should only find this string by the pattern "scrpts". But I can only make sed substitute that pattern and not the whole string. How can i make sed change the whole string where a pattern occurs instead of just the pattern i specified?

Should I be using other command?

Best regards,

Carlos

PS: Thanks Vino for your help in my other question.

Post the script you already have.

Vino

Ok,

I have a file with other substitution commands. The one concerning this case is as follows:

s/scrpts/$BUSINESS_SCRIPTS/

Then I invoke sed like this:

sed -f sedscript input_file > output_file

(This only changes me scrpts ... how can i replace the whole string where it occurs?)

Thank you.

How about this.

sed -n -e 's/\(.*scrpts.*\)[^>]/$BUSINESS_SCRIPTS/' inputfile

If that doesnt work, see what this sed returns

sed -n -e 's/\(.*scrpts.*\)[^>].*/\1/p' inputfile

vino

Thanks, it works just fine =D