Skip to main content
2 of 2
added 2 characters in body
985ranch
  • 151
  • 2
  • 11

Combine SED commands

What is the best way to combine these two SED commands together? The first command searches for CSP and then moves down one line. The second command puts a semicolon in column 3.

sed -ne '/CSP/{n;p;}' test1>test2
sed 's/./;/3' test2>final

The command is needed to act upon one line of data and cannot be conducted separately.

985ranch
  • 151
  • 2
  • 11