Use perl runtime options. Specify input file on command line. Redirect output to a file with your shell.
#!perl -p use strict; use warnings; my @fields = split /,/; $fields[3] = $fields[3] > 310 ? 'volmed' : $fields[3] == 70 ? 'volmedl': $fields[3] ; $_ = join ',', @fields;
In reply to Re: replace/substituion 4th field
by BillKSmith
in thread replace/substituion 4th field
by hyans.milis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |