PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Stephen Lee
> > Sent: Monday, February 03, 2003 3:54 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: OT: unix script quetion: to replace $ with \$
> >
> >
> >
> > Would somethin
3:54 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: OT: unix script quetion: to replace $ with \$
>
>
>
> Would something like this be adaptable to your stuff?
>
> #!/usr/bin/ksh
>
> {
> sqlplus -s <<-XXX
> joe/blow@SID
> set this an
044
echo '123$45$678' | sed -e "s#\044#\\\044#g"
Jared
"Guang Mei" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
02/03/2003 12:09 PM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Would something like this be adaptable to your stuff?
#!/usr/bin/ksh
{
sqlplus -s <<-XXX
joe/blow@SID
set this and that off
set the other thing and trimspool on
set whatever else
select table_name from dba_tables where owner = 'BUBBA';
} | while read LINE;
ORACLE-L
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Subject: Re: OT: unix script quetion: to replace $ with \$
Hi, Brian:
Thanks for your (and others) help. I can not use signle quotes in "echo"
in my program. The reason is
Your first "echo" needs to be in single quotes or else it results in...
29912:oracle@mybox> echo "123$45$678"
123578
Once that is done this...
29912:oracle@mybox> echo '123$45$678' | sed 's/\$/\\$/g'
123\$45\$678
...or this...
29912:oracle@mybox> echo '123$45$678' | sed 's/\$/\\\$/g'
123\$45\
Hi, Brian:
Thanks for your (and others) help. I can not use signle quotes in "echo"
in my program. The reason is this:
I am trying to run table analyze in multiple treads (I found doing this
reduce time by 50%). By doing this I run sh script
"gather_ISI_table_stats_executeX.sh":
essex$ more ga
echo '123$45$678' | sed -e 's#\$#\\$#g'
"Guang Mei" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
02/03/2003 10:39 AM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Subject:OT: unix script quetion: to repla
Problem here is that sed treats $ as a special characer meaning end of line as well as
the korn
shell meaning variable replacement.
To avoid the shell evaluation, use ' not ".
to avoid the sed special charater, escape it.
echo '123$45$678' | sed 's/\$/\\\$/g'
Ron Thomas
Hypercom, Inc
[EMAIL PR
Please note the use of single-quotes (') instead of
double-quotes (") in the echo command, as well as the use of
single-quotes in the sed command...
$ echo '123$45$678' | sed 's/\$/\\$/g'
123\$45\$678
Hope this helps...
> Hi:
>
> I have a quick question about replacing "$" with "\$" on
Use the translate command "tr". Type "man tr" for help with using it.
RWB
"Guang Mei" <[EMAIL PROTECTED]>@fatcity.com on 02/03/2003 12:39:48 PM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Hi:
I h
11 matches
Mail list logo