Created
March 4, 2014 12:07
-
-
Save fabienhinault/9345345 to your computer and use it in GitHub Desktop.
append the content of files named in lines beggining with "-- append "
This file contains hidden or 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
#!/bin/sh | |
# remove everything after -- /****** | |
sed -i "/-- \/\*\*\*\*\*\*\*/q" $1 | |
# append the content of files named in lines beggining with "-- append " | |
sed -n "/^-- append / s%^-- append \(.*\)$%cat \$(cygpath '\1') >> $1; echo >> $1% p" < $1 | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment