perl + export param in to perl syntax in shell script
- by yael
hi
I have the following script that replace a param to b param and match only the c parameter in line
how to change the perl syntax: "if /$c/" in order to export c param to the follwoing perl syntax
!/bin/bash
export a='@d&'
export b='new text'
export c='bla bla'
echo $c | perl -pe 'next if /^#/; s/(^|\s)\Q$ENV{a}\E(\s|$)/$1$ENV{b}$2/ if /$c/'