I write below shell script to check whether given character is in uppercase or lowercase..
case $d in
[a-z]) echo "Character is in Lowercase";;
[A-Z]) echo "Character is in Uppercase";;
grep "^[[:space:]]*clientPort[^[:alpha:]]" zoo.cfg
This is a grep pattern to extract the line that contains the port number from the configuration file.
1) Normally in a regex, I use square brackets ...
In The Linux Command Line William Shotts claims that character ranges can be problematic. See the relevant excerpt below, emphasis is mine.
If you are coming from another Unix-like ...
Consider the following example:
$ bash --version
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &...