sed -n 's/stuff\(.*\)more stuff/\1/p'
This will only show the data matched by the parenthesised expression.
The following example shows only unique filenames leaving out paths:
find . -iname "*file*"| sed -n 's/.*\/\(.*\)$/\1/p' | sort | uniq | less
No comments:
Post a Comment