Avatar of Amin El-Zein
Amin El-Zein

asked on 

escape single qouta in sed

Hello,
I have a file contain:
strtolower($g['sss'])
I want to chabge it to
strtolower(ffff)
I try with :
sed -I.original 's/strtolower($g\['''sss'''\])/strtolower(fff)/g;' myfile
but its not work I want to escap the single quota.
thanks.
LinuxSystem Programming

Avatar of undefined
Last Comment
MURUGESAN N
Avatar of ozo
ozo
Flag of United States of America image

sed -i.original 's/strtolower($g\['"'sss'\])/strtolower(fff)/g;" myfile
or
sed -i.original "s/strtolower(\$g\['sss'\])/strtolower(fff)/g;" myfile
ASKER CERTIFIED SOLUTION
Avatar of MURUGESAN N
MURUGESAN N
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of MURUGESAN N
MURUGESAN N
Flag of India image

@Gerwin Jansen and all

Thank you :) (for me to follow the same).
Proceed as per given comments.
Linux
Linux

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

71K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo