≡ Menu

BourneShell substring

Bash String Comparison: Find Out IF a Variable Contains a Substring

How do I determine whether a variable called spath="/srv/www/cyberciti.biz/https" contains a substring called "cyberciti.biz"?
[click to continue…]

Bash Substring Verification

How can I find out whether a variable called $vech contains a substring called 'car' under bash?

vech='car bus bike rail airplane'

[click to continue…]