pragovnj has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to replace a string in my perl script from the command line. This is what I tried. It ran and created a backup file too but the string was not replaced
perl -p -i.bak -e "s/CAST(CAST(hs_date AS DATE FORMAT 'YYYYMMDD') AS +CHAR(08)) as hs_date/FORMAT_DATE(hs_date, 'YYYYMMDD') as hs_date/g;" +HealthList
Is it because of the length or spaces?
TIA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replace string from Command Line
by Fletch (Bishop) on Oct 13, 2020 at 19:06 UTC | |
by AnomalousMonk (Archbishop) on Oct 13, 2020 at 19:30 UTC | |
by pragovnj (Acolyte) on Oct 13, 2020 at 20:26 UTC | |
by AnomalousMonk (Archbishop) on Oct 13, 2020 at 21:30 UTC | |
by pragovnj (Acolyte) on Oct 13, 2020 at 19:48 UTC | |
by AnomalousMonk (Archbishop) on Oct 13, 2020 at 20:03 UTC | |
|
Re: replace string from Command Line
by jszinger (Scribe) on Oct 13, 2020 at 19:31 UTC |