Using sed to strip space and remove last two characters


This shows the syntax for using sed to remove all the quotes, strip out all the spaces, and lop off the last two characters of each line.

sed -e 's/"//g' -e 's/ *//g' -e 's/..$//'

The data in the example looked like this:

"MAT 101 6 8"
"WBL -J 7 8"
"NCMC443 6 3"

09/15/2004