Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LXF66 Shell secrets article

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Magazine and coverdiscs
View previous topic :: View next topic  
Author Message
Nigel
LXF regular


Joined: Fri Apr 08, 2005 9:03 pm
Posts: 1141
Location: Gloucestershire, UK

PostPosted: Sun Apr 24, 2005 12:24 pm    Post subject: LXF66 Shell secrets article Reply with quote

Reading the Shell secrets article in LXF66 I noticed a couple of problems:

1. In the first section, 4th example... I may be wrong, but I don't think that the regex /^linux.*format$/ will match with either "linux Format" or "Linux users love Linux Format" by default... you need to have a flag set to ignore case.

Which brings me to:

2. on the second page, where you mention the case-insensitive flag for grep, it is correctly printed as "-i" in the code example, but referred to as "-l" in the text.

Hopefully these are just glitches that crept in during the typesetting/layout stage Embarassed

Otherwise a good article - I especially like the broken bookmarks example.


Nigel.
Back to top
View user's profile Send private message
txtedmacs



Joined: Sat Apr 23, 2005 11:36 pm
Posts: 6

PostPosted: Mon Apr 25, 2005 5:02 pm    Post subject: I tend to agree, plus a few more comments ... Reply with quote

Quote:
1. In the first section, 4th example... I may be wrong, but I don't think that the regex /^linux.*format$/ will match with either "linux Format" or "Linux users love Linux Format" by default... you need to have a flag set to ignore case.


That's exactly what I thought. Moreover, the slashes do not work on all distributions - e.g. on my laptop that still has Mdk 9.1 Pro I had to use single quotes, though I would have preferred to have used the slashes, which are used in perl regular expressions. Furthermore in perl you specifically set the ignore case as grep /.../i . Now finally add the warning I have seen: the switch/option on bash to ignore case (I believe is -i) does not work on all versions of bash! [Again, I really prefer the slash notation and when I am doing a match using php I use them; moreover, to protect my matching to ignore the case I use the syntax I noted above within the php functions.]

I had some other problems that I would have preferred to have written the author about directly, however, so far I have received no advice on how to email him.

These comments are NOT meant to be overly critical - I want to see this and other series on the command line continued. Please keep them coming!!
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Magazine and coverdiscs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast