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
- working of \n in python [duplicate]
- In the shell, what does ” 2>&1 ” mean?
- Regex not operator
- How to compare strings in Bash
- How do I use a regex in a shell script?
- -bash: syntax error near unexpected token `)’
- What is the difference between \r\n, \r, and \n? [duplicate]
- An example of how to use getopts in bash
- Regex how to match an optional character
- How to make “if not true condition”?
- How to remove punctuation in python?
- 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 do I iterate over a range of numbers defined by variables in Bash?
- How do I properly compare strings 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
- Ignoring upper case and lower case in Java
- How to reload .bash_profile from the command line?
- What is the purpose of “&&” in a shell command?
- 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?
- Bash scripting missing ‘]’
- sprintf like functionality in Python
- 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
- How do I set a variable to the output of a command in Bash?
- ./configure : /bin/sh^M : bad interpreter
- Center text in fixed-width field with stream manipulators in C++
- What is the $? (dollar question mark) variable in shell scripting?
- Is there a TRY CATCH command in Bash
- Mips how to store user input string
- Bash if statement with multiple conditions throws an error
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Is there a “goto” statement in bash?
- How to assign multiple lines string in Powershell Console
- Bash script: bad interpreter
- LC-3 STR with R1 as offset
- Lua read beginning of a string
- How do I remove the file suffix and path portion from a path string in Bash?
- Sorting data based on second column of a file
- Speed up rsync with Simultaneous/Concurrent File Transfers?
- How do I print my Java object without getting “SomeType@2f92e0f4”?
- How can I process each letter of text using Javascript?
- PHP to write Tab Characters inside a file?
- zip error – Nothing to do
- How to sort an array in Bash
- What does set -e mean in a bash script?
- Meaning of “[: too many arguments” error from if [] (square brackets)
- Passing string to a function in C – with or without pointers?
- Lua String replace
- Trim a string in C [duplicate]
- How to remove first character from C-string?
- Copy multiple files from one directory to another from Linux shell
- Standard function to replace character or substring in a char array?
- Integer expression expected error in shell script
- How to add a timestamp to bash script log?
- How to run command as user who has /usr/sbin/nologin as Shell?
- How can I fully log all bash scripts actions?