Return to Snippet

Revision: 72797
at January 8, 2018 13:57 by brm


Initial Code
# i used hexdump to find out the special characters
# hexdump -c file
# below commands will extract the pattern include 100 characters on right and left from the keyword pattern
tr -d '[[:space:]]' < file | grep -o '/\{0,100\}PATTERN.\{0,100\}'

Initial URL

                                

Initial Description
join characters inside file by extracting keyword which separate by newline and special characters by including desired numbers characters on right and left

Initial Title
join-chars--newline-file

Initial Tags
Bash, linux

Initial Language
Bash