grep -o -w '\(48\|55\)=[^[:cntrl:]]\+' FILE | perl -pe 's/(\d+=[^\n]+)\n/\1~/' | perl -pe 's/([^~]+~[^~]+)~/\1\n/g'
grep -o -w '\(48\|55\)=[^[:cntrl:]]\+' FILE | tr '\n' '~' | perl -pe 's/([^~]+~[^~]+)~/\1\n/g'
grep -o -w '\(48\|55\)=[^[:cntrl:]]\+' FILE | sed 'N;s/\n/ /'
-o Print only the matched parts of a matching line
-w Select lines containing matches that form whole words (a whole char is a letter, digit and underscore)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment