strip lines from multiple files


/ Published in: Bash
Save to your folder(s)

This removes the first six lines from a set of .csv files and writes them to a subdirectory, using awk


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. #
  3. for FILE in *.csv; do
  4. echo FILE = ${FILE}
  5. awk 'FNR>6{print}' ${FILE} > stripped/${FILE}
  6. done

URL: http://www.unix.com/shell-programming-scripting/110496-awk-find-replace-multiple-files.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.