Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created May 23, 2014 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msonnabaum/ad7ddcc39136f52eb0a9 to your computer and use it in GitHub Desktop.
Save msonnabaum/ad7ddcc39136f52eb0a9 to your computer and use it in GitHub Desktop.
#!/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