I have a simple awk and sed command that I want to write into a perl script or alternatively use the perl equivalent? Any pointers would be appreciated
sed -e '1d;4d' -e 's/#/Time/' -e 's/TGID/PID/' -e 's/%guest/%CPU/' -e 's/RSS/%MEM/'
awk '{ print $1,$3,$7,$13,$NF }'
Without context, it's hard to give you exact answers, but Perl also has the
s///
command, so that should be easy.To skip given lines, you can add something like
To print only the given columns, you usually keep them in an array, and then just