Skip to content

Instantly share code, notes, and snippets.

@bradlucas
Created September 19, 2016 18:23
Show Gist options
  • Save bradlucas/bc4b54e83c9507e81861170329f2e35c to your computer and use it in GitHub Desktop.
Save bradlucas/bc4b54e83c9507e81861170329f2e35c to your computer and use it in GitHub Desktop.
headers.sh
#!/bin/bash
# Echo the header lines for all the cvs files in the current directory
for filename in *.csv;
do
# echo $filename;
line=$(head -n 1 $filename);
echo $line;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment