1
First, I am using GNU userland so you can assume I use Bash, GNU coreutils...
I have a HTML and I want to change all
href="foobarz"
into
href=""
However, I don't want to change any line containing the word css
(not case-sensitive)
'href="fooCsSbarz"'
should remain unchanged
I am currently using the command
$ cat foo.html | sed -e 's/href="[^"]*"/href=""/g' > bar.html
but it cannot retain those lines containing the word css
(not case-sensitive)
Actually, any tool available in *nix is welcomed, like sed, awk, perl...
Thank for your help!
Thanks a lot! That thread 's title is not 'grep-friendly'... – Alex Vong – 2015-04-08T04:12:59.823