Created
May 16, 2012 08:27
-
-
Save larsr/2708695 to your computer and use it in GitHub Desktop.
Two-line shell archive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEP=03248902398402398402390239402 | |
awk < $0 '/^'$SEP'/{f=substr($0,length("'$SEP'")+2);} f && !/^'$SEP'/{print $0 > f}'; exit $? | |
03248902398402398402390239402-file_one.txt | |
this is | |
file one | |
03248902398402398402390239402-file_two.txt | |
and this | |
is file | |
number two | |
03248902398402398402390239402 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment