13
votes
Accepted
POSIX sh alternative to using [[ ... ]] in Bash
Most people use case statements for option processing because it's simple and easy and it works. There are countless examples using either built-in getopts or /usr/bin/getopt or custom/hand-crafted. ...
7
votes
POSIX sh alternative to using [[ ... ]] in Bash
expr and awk are two POSIX utilities that can do regexp matching. expr using basic regexp¹ and awk a variant of extended regexp². expr suffers from a number of design flaws and is usually considered ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
shell-script × 16836bash × 6993
shell × 2441
linux × 1944
scripting × 1188
text-processing × 1125
awk × 1007
sed × 857
files × 501
grep × 483
command-line × 422
ssh × 384
find × 377
variable × 340
ubuntu × 310
zsh × 310
cron × 287
regular-expression × 249
ksh × 234
quoting × 231
pipe × 226
io-redirection × 218
terminal × 206
date × 199
rename × 182