Quantcast
Channel: Delete multiple rows in csv file - Ask Ubuntu
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article


Delete 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
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>