Skip to content

Instantly share code, notes, and snippets.

@praton1729
Created April 19, 2019 00:36
Show Gist options
  • Save praton1729/b78c7abdf39eae93090a457193b3c299 to your computer and use it in GitHub Desktop.
Save praton1729/b78c7abdf39eae93090a457193b3c299 to your computer and use it in GitHub Desktop.
A simple script to eleminate rows 1-119 and 1st column from csv files in cwd
#! /bin/bash
for i in $(ls -d */); do
cd $i
echo $i
for j in $(ls Trans*.csv);do
sed -e '1,119d' < $j | cut -d ',' -f 2- > tmp.csv
mv tmp.csv $j
done
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment