On Sun, 19 Aug 2007 07:10:30 +0200 Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote:
> On Sunday 19 August 2007 04:00:45 »Q« wrote: > > It works as it is, but I'm interested in learning about any newbie > > traps into which I might be falling or about any better practices I > > should use. This is my first attempt at printing a usage message or > > parsing arguments. > > > > The script is at <http://remarqs.net/misc/mids2urls.sh.txt>. Feel > > free to reply to me off-list (or just to flame me) if you think > > this kind of non-Gentoo-specific stuff has no place here. > > It's hardly the best place to ask this kind of question but > anyway.. :p Yeah. Thanks for having a look at it anyway. Is there a list or group that welcomes this kind of stuff? I looked but couldn't find one. > The most noticeable thing which is wrong with this script is the > quoting inside the brackets [ ]. Since you use bash you should just > use [[ ]] instead (which makes most of the quoting in them > unneeded..). Also things like [[ $foo == "" ]] should rather be [[ -n > $foo ]] but that's a minor. Thanks much. And thanks for the link. > Finally the number of calls to grep, sed and tr clearly shows that > you could improve your knowledge about sed.. ;) Yeah, very true. > http://wooledge.org/mywiki/BashFAQ#head-b1c292ce2f4fdfa6a7b5389da1892d65b6f37cda -- [EMAIL PROTECTED] mailing list