[PLUG] Correcting duplicate strings in files

Rich Shepard rshepard at appl-ecosys.com
Tue Jun 19 21:04:16 UTC 2018


On Tue, 19 Jun 2018, Robert Citek wrote:

> Good luck and let us know how things go.

   This can be done using awk and flags. I've not before used flags in awk so
I don't know the proper sequence of commands. What I have now is:

$2!="16.00" { print }
$2=="16:00" { print; flag=1 }
$2=="16:00" { $2=="17:00"; print; flag=0 }

   This prints the input file without change. If anyone has thoughts on how
to use a flag to change the value of field 2 please share them with me.

Rich



More information about the PLUG mailing list