Created
May 23, 2014 18:09
-
-
Save msonnabaum/ad7ddcc39136f52eb0a9 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
for FILE in $@ | |
do | |
TYPE=`file -b $FILE` | |
if [ "${FILE##*.}" != "csv" -o "$TYPE" != "ASCII text" ] | |
then | |
echo "$FILE is not a csv file!" | |
exit 1 | |
fi | |
done | |
FIRST_FILE=$1 | |
shift | |
FILES=$@ | |
cat $FIRST_FILE | |
for FILE in $@ | |
do | |
tail -n +2 $FILE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment