[Hpr] Fwd: mini typo - GNU AWK

Ken Fallon ken at fallon.ie
Sun Aug 16 23:18:38 PDT 2020


+Admin list.



-------- Forwarded Message --------
Subject: 	mini typo - GNU AWK
Date: 	Sun, 16 Aug 2020 15:24:32 +0000
From: 	Reto R. <reto007 at hotmail.com>
To: 	ken at fallon.ie <ken at fallon.ie>



Hi Ken,

I found the series  AWK & SED 😄 - I would like to learn that
too. http://www.hackerpublicradio.org/eps.php?id=2114 :
My bad, but I stumbled upon two simple things:

// 1 //
To create the inital file it says (with different character style):
Here is a simple example file that we will be using, called   |file1.txt|:

Then further down in the tutorial - I didn't see the hint (in yellow) to
create another file:


    Field separator

By default, awk uses white space as the file separator. You can change
this by using the -F option. For instance, file1.csv looks like this:



// 2 //
- missing  '  at the end of  }  in this example.


Using output redirection, you can write your results to file. For example:

|awk -F, '$3>5 {print $1, $2}file1.csv > output.txt|


Br,
Reto


------------------------------------------------------------------------
*Von:* Ken Fallon
*Gesendet:* Donnerstag, 13. August 2020 08:58
*Bis:* Reto R.
*Cc:* Dave Morriss
*Betreff:* Re: [Admin] RSS lists just 10 entries

Thanks !

All fixed. Keep them coming.

-- 
Regards,

Ken Fallon
http://kenfallon.com
http://hackerpublicradio.org/correspondents.php?hostid=30

-- 
Regards,

Ken Fallon
http://kenfallon.com
http://hackerpublicradio.org/correspondents.php?hostid=30

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/attachments/20200817/84b15fe3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/attachments/20200817/84b15fe3/attachment-0001.sig>


More information about the Hpr mailing list