but:why does bash has to be in posix mode?main is useless : function are mostly used for repeated code.instead of testing the whole $* variable, just $1, or $# being 1 or more.variables in tests should always be quoted.expr is not bash, you probably can do the same thing using double suare brackets and BAASH_REMATCHregex for [[ is easier to use in a variable

Code:

reg="^ *[\"']"[[ $var =~ $reg ]] ...

you see that lhs var doesn't need to be quoted.instead of using awk, you could read line in an array, based on defined IFS, and print its fields in any order.use more quotes

Who is online

Users browsing this forum: No registered users and 8 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum