Re: [PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
On Wed, 23 Sep 2020, Rich Shepard wrote: Off the mail list. Oops! My apologies to everyone else. Sigh, Rich ___ PLUG: https://pdxlinux.org PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
On Wed, 23 Sep 2020, Larry Brigman wrote: Note your sample data has issues with embedded field separator data. Larry, Off the mail list. In my 32 years as an environmental consultant I've yet to see a regulatory agency that has a correctly set-up database. And most companies use

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
On Wed, 23 Sep 2020, Larry Brigman wrote: Note your sample data has issues with embedded field separator data. Larry, Yep. I'm cleaning that. Thank you, Rich ___ PLUG: https://pdxlinux.org PLUG mailing list PLUG@pdxlinux.org

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Larry Brigman
Note your sample data has issues with embedded field separator data. On Wed, Sep 23, 2020 at 2:04 PM Rich Shepard wrote: > > On Wed, 23 Sep 2020, Robert Citek wrote: > > > Couldn't help to golf that. :) > > awk -v FS=, '$7 !~ /Gen12[cu]/' > > Robert, > > That's another alternative I didn't see

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
On Wed, 23 Sep 2020, Robert Citek wrote: Couldn't help to golf that. :) awk -v FS=, '$7 !~ /Gen12[cu]/' Robert, That's another alternative I didn't see or think of trying. Thanks, Rich ___ PLUG: https://pdxlinux.org PLUG mailing list

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Robert Citek
Couldn't help to golf that. :) awk -v FS=, '$7 !~ /Gen12[cu]/' Regards, - Robert On Wed, Sep 23, 2020 at 1:02 PM wrote: > cat inputFile | awk -v FS=, '$7~/Gen12c|Gen12u/ {next; } {print;}' > > outFile > > On Wed, 2020-09-23 at 12:44 -0700, Rich Shepard wrote: > > Using gawk I want to print

Re: [PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
On Wed, 23 Sep 2020, tomas.kuchta.li...@gmail.com wrote: cat inputFile | awk -v FS=, '$7~/Gen12c|Gen12u/ {next; } {print;}' > outFile Thank, Tomas. That's one I hadn't tried. Stay well, Rich ___ PLUG: https://pdxlinux.org PLUG mailing list

Re: [PLUG] Awk script syntax help

2020-09-23 Thread tomas . kuchta . lists
cat inputFile | awk -v FS=, '$7~/Gen12c|Gen12u/ {next; } {print;}' > outFile On Wed, 2020-09-23 at 12:44 -0700, Rich Shepard wrote: > Using gawk I want to print all lines in a file except those that have > any of > three patterns in field 7. I thought I had the proper syntax but gawk > disagrees

[PLUG] Awk script syntax help

2020-09-23 Thread Rich Shepard
Using gawk I want to print all lines in a file except those that have any of three patterns in field 7. I thought I had the proper syntax but gawk disagrees and I'm not finding the proper syntax in my awk books or in web searches. I've tried using if-else (my first choice), as well as negating