Quote:
|
casper@dots11> sed 's/\(...\).*/\1/ ' newcomlite
|
This says KEEP the first 3 characters. You are using a "backreference" in which everything inside \(\) is repeated using \1.
It is matching the "%" just fine----in your example, you are getting the expected output.
rizhun's example above should work, except that it would need the -r flag:
sed -e
-r 's/^.{3}//'
You could also use something like:
sed 's/^%%.//'