Skip to content

Instantly share code, notes, and snippets.

@marantz
Created August 1, 2019 03:50
Show Gist options
  • Save marantz/0d8981e6e95c25501de3756d274268a3 to your computer and use it in GitHub Desktop.
Save marantz/0d8981e6e95c25501de3756d274268a3 to your computer and use it in GitHub Desktop.
Head cut sed
for file in ./*.csv
do
start=$(sed -n '/Word/=' $file)
end=$(wc -l $file | awk '{print $1}')
sed -n ${start},${end}p $file > ./new/$file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment