How to delete the first and last two characters from a text file using sed?
bash, command-line, sed, string-parsing
Solution
sed 's/^.\(.*\)..$/\1/' file
Problem
I have a text file like this ``` abcdefg abcdefg abcdefg abcdefg ``` How to delete the first and last two characters from each line with sed? I would like to get the output like this ``` bcde bcde bcde bcde ```