Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash check if string starts with substring

# Original source: Advanced Bash Scripting Guide (http://tldp.org/LDP/abs/html/comparison-ops.html)
# The == comparison operator behaves differently within a double-brackets
# test than within single brackets.

[[ $a == z* ]]   # True if $a starts with a "z" (wildcard matching).
[[ $a == "z*" ]] # True if $a is equal to z* (literal matching).
Comment

PREVIOUS NEXT
Code Example
Shell :: powershell suppress error 
Shell :: wget install windows cmd 
Shell :: git archive 
Shell :: convertir a sudoers user centos 
Shell :: wordpress update core and plugins cli 
Shell :: linux find where program is installed 
Shell :: how to run mongodb shell 
Shell :: extract tar.gz in linux 
Shell :: conda install flake8 
Shell :: how to branch from a branch in git 
Shell :: commitlint, husky, commitzen 
Shell :: install packages from pipfile 
Shell :: how to call a batch file from another batch file 
Shell :: diff specific file git different branches 
Shell :: check linux file size 
Shell :: git merge squash 
Shell :: how to install fish in debian 
Shell :: service redis restart 
Shell :: pgadmin4 on docker 
Shell :: composer install fast download 
Shell :: linux show all group members 
Shell :: git check if stash exists 
Shell :: minikube memory size 
Shell :: get path composer 
Shell :: openssh linux mint 
Shell :: htpasswd add user 
Shell :: linux read text file command line 
Shell :: docker remove dangling images 
Shell :: git got to previous commit 
Shell :: conda install pandas 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =