test
‘s string equality operator doesn’t do globs.
$ [ abc = *bc ] ; echo $? 1 $ [[ abc = *bc ]] ; echo $? 0
Related Posts:
- Extract substring in Bash
- How do I split a string on a delimiter in Bash?
- Multi-line string with extra space (preserved indentation)
- Multi-line string with extra space (preserved indentation)
- How can I declare and use Boolean variables in a shell script?
- How can I declare and use Boolean variables in a shell script?
- How do I split a string on a delimiter in Bash?
- How do I compare two string variables in an ‘if’ statement in Bash?
- How to trim whitespace from a Bash variable?
- How to trim whitespace from a Bash variable?
- bash : Bad Substitution
- How to convert a string to lower case in Bash?
- How to split one string into multiple strings separated by at least one space in bash shell?
- Shell script not running, command not found
- Extract filename and extension in Bash
- How do I know the script file name in a Bash script?
- What is the difference between double and single square brackets in bash?
- What is “-bash: !”: event not found”
- What is lexicographical order?
- How do I pause my shell script for a second before continuing?
- Regex not operator
- How do I tell if a regular file does not exist in Bash?
- working of \n in python [duplicate]
- Regex not operator
- Extract a substring using PowerShell
- In the shell, what does ” 2>&1 ” mean?
- Is double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
- Regex not operator
- Ubuntu says “bash: ./program Permission denied” [closed]
- How to compare strings in Bash
- Why do you need to put #!/bin/bash at the beginning of a script file?
- In the shell, what does ” 2>&1 ” mean?
- How do I use a regex in a shell script?
- How to concatenate string variables in Bash
- -bash: syntax error near unexpected token `)’
- What is the difference between \r\n, \r, and \n? [duplicate]
- How to grep for case insensitive string in a file?
- An example of how to use getopts in bash
- string to string array conversion in java
- Difference between wait and sleep
- What is the difference between \r\n, \r, and \n? [duplicate]
- How do I parse command line arguments in Bash?
- Regex how to match an optional character
- How to make “if not true condition”?
- How to remove punctuation in python?
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- How to mkdir only if a directory does not already exist?
- An “and” operator for an “if” statement in Bash
- Loop through an array of strings in Bash?
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- How can I check if a directory exists in a Bash shell script?
- How do I iterate over a range of numbers defined by variables in Bash?
- How do I properly compare strings in C?
- How to remove .html from URL?
- What is the difference between a “line feed” and a “carriage return”?
- How to convert an int to string in C?
- How do I iterate over a range of numbers defined by variables in Bash?
- How to mkdir only if a directory does not already exist?
- An “and” operator for an “if” statement in Bash
- “unary operator expected” error in Bash if condition
- Python: TypeError: cannot concatenate ‘str’ and ‘int’ objects
- What does “-ne” mean in bash?
- “sed” command in bash
- How to reload .bashrc settings without logging out and back in again?
- In a Bash script, how can I exit the entire script if a certain condition occurs?
- Ignoring upper case and lower case in Java
- How to replace all double quotes to single quotes using jquery?
- How to reload .bash_profile from the command line?
- What is the purpose of “&&” in a shell command?
- Convert character to ASCII numeric value in java
- How to generate random number in Bash?
- Replace one substring for another string in shell script
- How to check if a variable is set in Bash?
- What does strcmp() exactly return in C?
- Generate random string/characters in JavaScript
- How does “cat << EOF" work in bash?
- Bash scripting missing ‘]’
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How to get the filename without the extension from a path in Python?
- sprintf like functionality in Python
- How can I compare numbers in Bash?
- C – The %x format specifier
- What is a list in Bash?
- Lua string.format options
- Open and write data to text file using Bash?
- n-grams in python, four, five, six grams?
- How can I count all the lines of code in a directory recursively?
- How can I kill a process by name instead of PID, on Linux?
- Given two directory trees, how can I find out which files differ by content?
- Alphabet range in Python
- Which characters need to be escaped when using Bash?
- How to remove the quotes when reading a variable in jq in shell?
- Shell: How to call one shell script from another shell script?
- How can I match a string with a regex in Bash?
- Pseudo-terminal will not be allocated because stdin is not a terminal
- find: missing argument to -exec
- How do I set a variable to the output of a command in Bash?
- Meaning of $? (dollar question mark) in shell scripts
- ./configure : /bin/sh^M : bad interpreter
- What is the difference between ‘ and ” in JavaScript?