this question has answer here:
- deleting column selection in awk 1 answer
i have script
awk -f, '$4!~/abcdef/{print $0}' file_name.csv>new_file_name.csv this script , deletes entire row in csv file if cell in 19 th (d - column in csv) column consists of abcdef . here giving file name , new file name manually . have pick files in directory , export file directory . how can ?
you can run script in directory contains *csv files:
for f in *.csv; awk -f, '!($4 ~ /abcdef/)' "$f" > "/dest/dir/$f" done
Comments
Post a Comment