I've created an awk script and use it like this:
# grep -E "[PM][IP][DO][:S]" file.txt | awk-script
How can I modify the awk script to include the effort of the grep command (which is searching for either "PID:" or "MPOS"?
awk-script is:
#!/usr/bin/awk -f
/Sleeve/ {
printf("%8d, %7d, %7.2f, %7.2f, %7.2f\n", $5, $6, $7, $30, $31)
}
/Ambient/ {
printf("%8d, %7d,,,, %7.2f, %7.2f\n", $5, $6, $7, $8)
}
/MPOS:/ {
printf("%8d, %7d,,,,,, %5d, %5d\n", $4, $5, $2, $3)
}