| PLEX86 | ||
|
using regular expressions in shell script conditional statementsMy SuSE Security Icon Is Red Again. Is Linux really secure I seem to be getting an awful many lot of Suse Security Advices. These are some of... On Wed, 24 Aug 2005 01:23:24 -0400, William Park staggered into the Black Sun and said: ...the sed manpage used to say something like "there isn't a regex manpage, but someone really should write one." Good to see that someone has. Of course, "man regex" will get you the page from section 3, which is almost completely useless for this sort of thing. In the future, it may not be as important, since a number of things (like Postfix and recent sed according to the manpage for sed 4.1.4) have gone to PCRE. Except that you have to put it in $(( )) , which is A) not obvious B) annoying. That's what I meant by "syntactical oddities". That's not comparison, not an arithmetic one, while -lt does an arithmetic one" are also jarring and strange. I guess many of the weird syntactical things in bash arise from its being both an interactive shell and a scripting language. Those syntax weirdnesses and the lack of good complex data structures mean that I don't use bash for scripting unless it's absolutely necessary (init scripts) or the script is simple enough to be done in less than one screen. YMMV, obviously. -- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong ----------------------------- penguins, is Tux." --MegaHAL
|
||||
My SuSE Security Icon Is Red Again. Is Linux really secure Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||