DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
how to check whether a string contains a special character or not in bash
if [[ $str =~ ['!@#$%^&*()_+'] ]]; then echo yes else echo no fi
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#check
#string
#special
#character
#bash
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit