Awk is an invaluable tool for administrators. I add basic awk commands to my course material. I believe if we are going to introduce sed we should at some point introduce awk and show how it may be used to parse logs and format reports
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Friday, June 27, 2014 12:00 PM To: [email protected] Subject: lpi-examdev Digest, Vol 80, Issue 7 Send lpi-examdev mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-examdev or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of lpi-examdev digest..." Today's Topics: 1. Re: awk (Bryan J Smith) 2. Re: awk (Simone Piccardi) 3. Re: rsync (Ingo Wichmann) ----------------------------------------------------------------- ----- Message: 1 Date: Fri, 27 Jun 2014 06:34:43 -0400 From: Bryan J Smith <[email protected]> Subject: Re: [lpi-examdev] awk To: "This is the lpi-examdev mailing list." <[email protected]> Message-ID: <[email protected] om> Content-Type: text/plain; charset="utf-8" On Fri, Jun 27, 2014 at 6:06 AM, Fabio Alessandro Locati < [email protected]> wrote: > I think that 99% of the times the same action could be done in > different ways, with different programs. I think LPI should accept > awk/perl based answers but should not enforce the usage of any of the > two, at least in LPIC1. It could be a topic for more advanced LPI certification, imho. > ?Hence why regular expressions exist for a reason. ;) I end up doing far more sed (single-line) and perl (multi-line) because they tend to be the easiest solutions for regex. I also found sed to be the most consistent and capable in busybox, unlike busybox implementations of other tools. -- bjs ? ? ? -- Bryan J Smith - UCF '97 Engr ----------------------------------------------------------------- "In a way, Bortles is the personification of the UCF football program. Each has many of the elements that everyone claims to want, and yet they are nobody's first choice. Coming out of high school, Bortles had the size and the arm to play at a more prestigious program. UCF likewise has the market size and the talent base to play in a more prestigious conference than the American Athletic. But timing and circumstances conspired to put both where they are now." -- Andy Staples, CNN-Sports Illustrated ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.lpi.org/cgi-bin/mailman/private/lpi-examdev/attachmen ts/20140627/50a5ca6c/attachment.html ------------------------------ Message: 2 Date: Fri, 27 Jun 2014 14:50:34 +0200 From: Simone Piccardi <[email protected]> Subject: Re: [lpi-examdev] awk To: "This is the lpi-examdev mailing list." <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 06/27/2014 12:01 AM, G. Matthew Rice wrote: > On Tue, Jun 24, 2014 at 2:09 PM, Alan McKinnon <[email protected]> wrote: >> I'd vote to include awk, but not perl. For the simple reason that >> every question I can think of for perl tests perl's syntax; and this >> is a sysadmin rating exam, not a programmer exam. > > Although, Perl used to be in the purview of the sysadmin...Now, it's > Python or Ruby, right? > > Awk is a huge can of worms, though. It _is_ a programming language. > > Just my two cents. > My only use of awk is for something like: awk '{print $N}' just because it short. If I need complex parsing that I cannot do with sed/grep/cut/tr I usually write a program (using my favorite scripting language, that's not perl nor awk...). But this far exceed a junior sysadmin knowledge. Simone -- Simone Piccardi Truelite Srl [email protected] (email/jabber) Via Monferrato, 6 Tel. +39-347-1032433 50142 Firenze http://www.truelite.it Tel. +39-055-7879597 Fax. +39-055-7333336 ------------------------------ Message: 3 Date: Fri, 27 Jun 2014 17:46:31 +0200 From: Ingo Wichmann <[email protected]> Subject: Re: [lpi-examdev] rsync To: "This is the lpi-examdev mailing list." <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Am 26.06.2014 23:59, schrieb G. Matthew Rice: > On Tue, Jun 24, 2014 at 12:29 PM, Michael Gisbers <[email protected]> wrote: >> it's one of the tools which seems to be even used more often than cp and should be included. > > Well, it's included in LPIC-2 under backups. It would cause > duplicate coverage to add it to LPIC-1. Considering LPIC-2 was just > updated, that overlap would continue for quite a while. Although, > it's not a huge overlap. Having it in LPIC2 is fine with me. There is too much content in LPI1 anyway. Ingo -- Linuxhotel GmbH, Gesch?ftsf?hrer Dipl.-Ing. Ingo Wichmann HRB 20463 Amtsgericht Essen, UStID DE 814 943 641 Antonienallee 1, 45279 Essen, Tel.: 0201 8536-600, http://www.linuxhotel.de ------------------------------ _______________________________________________ lpi-examdev mailing list [email protected] http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-examdev End of lpi-examdev Digest, Vol 80, Issue 7 ****************************************** _______________________________________________ lpi-examdev mailing list [email protected] http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-examdev
