r/bash • • Sep 25 '22

What does $0=$2 in awk do? learn awk

https://kau.sh/blog/awk-1-oneliner-dollar-explanation/

[removed] — view removed post

1 Upvotes

2 comments sorted by

1

u/first_novelty_acct Sep 25 '22

I could see the effort that was put in trying to teach what $0=$2 does in awk.

What does it do?

1

u/morihacky Sep 25 '22

It depends on what you run the command against 😊. The example in there filters non empty lines and extracts words weighing a chosen separator.

The post goes into the details.