↧
Answer by steeldriver for Delete multiple rows in csv file
I'm not sure why you are wrapping this in a shell function - I will assume that's a requirement of your assignment. First, note that using "*;"* as a field separator in Awk is not a robust way to...
View ArticleAnswer by Sebastian Stark for Delete multiple rows in csv file
There is not really a need for an array. You could define your function like this: delete() { awk -v customer="^($1)\$" -F ";" '$1 !~ customer {print $ALL}' input.csv >output.csv } I didn't...
View ArticleDelete multiple rows in csv file
I'm working on this assignment to delete rows from a CSV file with different customers. I've figured out how to delete one specific customer by using this code: delete() { awk -F "\"*;\"*" '$1 != '$@'...
View Article