Comments on: How to Use Compound Expressions with Awk in Linux – Part 5 https://www.tecmint.com/combine-multiple-expressions-in-awk/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 12 Aug 2024 06:43:51 +0000 hourly 1 By: lanz https://www.tecmint.com/combine-multiple-expressions-in-awk/comment-page-1/#comment-1404865 Sat, 26 Dec 2020 11:05:53 +0000 http://www.tecmint.com/?p=20852#comment-1404865 Thanks, Ren!!

Correct answer. You hit the mail.

]]>
By: Aaron Kili K https://www.tecmint.com/combine-multiple-expressions-in-awk/comment-page-1/#comment-796132 Tue, 28 Jun 2016 21:12:41 +0000 http://www.tecmint.com/?p=20852#comment-796132 In reply to braykov.

Point taken, will do as you have mentioned.

]]>
By: braykov https://www.tecmint.com/combine-multiple-expressions-in-awk/comment-page-1/#comment-796080 Tue, 28 Jun 2016 12:26:10 +0000 http://www.tecmint.com/?p=20852#comment-796080 Do not use parenthesis when explaining you are “flagging the text with…” (**), when you are actually flagging it with just **. The special code formatting (the pink text box) already depicts that meaning. Putting extra parenthesis just makes it more cumbersome.
The same is for “(and)” and “(or)” in the third paragraph.

]]>
By: Aaron Kili K https://www.tecmint.com/combine-multiple-expressions-in-awk/comment-page-1/#comment-793285 Tue, 21 Jun 2016 05:43:51 +0000 http://www.tecmint.com/?p=20852#comment-793285 @Ren

The line is:
7 Nano_Prowler_Mini_Drone $36.99 Tech

Not:

7 Nano_Prowler_Mini_Drone $3.99 Tech

So it is supposed to be printed with a “*” since it is above $20

]]>
By: Ren https://www.tecmint.com/combine-multiple-expressions-in-awk/comment-page-1/#comment-793032 Mon, 20 Jun 2016 12:49:25 +0000 http://www.tecmint.com/?p=20852#comment-793032 I think
$ awk '($3 ~ /^\$[2-9][0-9]*\.[0-9][0-9]$/) && ($4=="Tech") { printf "%s\t%s\n",$0,"*"; } ' tecmint_deals.txt
should change to
$ awk '($3 ~ /^\$[2-9][0-9]+\.[0-9][0-9]$/) && ($4=="Tech") { printf "%s\t%s\n",$0,"*"; } ' tecmint_deals.txt
otherwise, the following line will also printed with “*”:
7 Nano_Prowler_Mini_Drone $3.99 Tech

P.S. Sorry for my English.

]]>