[Hpr] Fwd: mini typo - GNU AWK

Dave Morriss perloid at autistici.org
Mon Aug 17 04:29:17 PDT 2020


On 17/08/2020 07:18, Ken Fallon wrote:
> +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

Thanks for the feedback Reto. I have adjusted the notes both on the HPR
site and on archive.org (https://archive.org/details/hpr2114).

The two example files you mention can be downloaded from part 2
(http://hackerpublicradio.org/eps.php?id=2129).

Dave

-- 
Dave Morriss, Edinburgh, Scotland, UK | perloid at autistici.org



More information about the Hpr mailing list