bash - Deleting first row of each csv file using sed -
i trying delete first row of each of .csv files in dir folder using sed:
dir=/home/results filename in "$dir"; sed 1d filename.csv done however, doesn't work. new bash scripting , thankful if tells me how fix this.
just do:
for f in /home/results/*.csv; sed -i '1 d' "$f"; done the glob pattern /home/results/*.csv matches .csv files in /home/results/ directory , for construct iterate on files, sed in place removal of first row each file.
Comments
Post a Comment