回复 5# moperyblue
sl-MacBookProesktop sl$ sed '1,2{s/^\(\S\+\s\+\)\{2\}//M}' test.dat
sed: 1: "1,2{s/^\(\S\+\s\+\)\{2\ ...": bad flag in substitute command: 'M'
info sed
=>
`M'
`m'
The `M' modifier to regular-expression matching is a GNU `sed'
extension which causes `^' and `$' to match respectively (in
addition to the normal behavior) the empty string after a newline,
and the empty string before a newline. There are special character
sequences (`\`' and `\'') which always match the beginning or the
end of the buffer. `M' stands for `multi-line'.