DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
separate a file by pattern
cat input.txt | awk -v RS="pattern_to_split" '{ print $0 > "out_name" NR }'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#separate
#file
#pattern
ADD COMMENT
Topic
COMMENT
Name
9+9 =
Submit