Posted By

powerthru on 10/11/10


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

jeremydouglass
symsec


strip lines from multiple files


 / Published in: Bash
 

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

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

  1. #!/bin/bash
  2. #
  3. for FILE in *.csv; do
  4. echo FILE = ${FILE}
  5. awk 'FNR>6{print}' ${FILE} > stripped/${FILE}
  6. done

Report this snippet  

You need to login to post a comment.