1748265 Members
3980 Online
108760 Solutions
New Discussion юеВ

Scripting issue

 
SOLVED
Go to solution
Dewa Negara_4
Regular Advisor

Scripting issue

Hi All,

Any one can help me to tell how to translate "cane*p" to "cane\*p" (there is a back slash after * sign) using shell scripting? either using tr or sed command.

Please help.

Thanks and Best Regards,
Dewa
Santos
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: Scripting issue

Hi Dewa:

# echo "cane*p"|sed -e 's%*%\\*%'

Regards!

...JRF...
Dewa Negara_4
Regular Advisor

Re: Scripting issue

Thanks a lot James.
Santos
Arturo Galbiati
Esteemed Contributor

Re: Scripting issue

echo "cane*p"|awk '{sub("\*","\\*");print}'
HTH,
Art