Quoting when setting $FOO
is not enough. You need to quote the variable reference as well:
me$ FOO="BAR * BAR"
me$ echo "$FOO"
BAR * BAR
More Related Contents:
- Which characters need to be escaped when using Bash?
- How to match a single quote in sed
- How to run the sftp command with a password from Bash script?
- Why does “local” sweep the return code of a command?
- bash : Illegal number
- Batch renaming files with Bash
- Shell redirection i/o order
- How to generate random number in Bash?
- “Invalid Arithmetic Operator” when doing floating-point math in bash
- Using sed to mass rename files
- Colorized grep — viewing the entire file with highlighted matches
- How to pass in password to pg_dump?
- Select random lines from a file
- Variables getting reset after the while read loop that reads from a pipeline
- Bash script to cd to directory with spaces in pathname
- Should I use a Shebang with Bash scripts?
- How to schedule to run first Sunday of every month
- Command to escape a string in bash
- Why would I create an alias which creates a function?
- Rename all files in directory from $filename_h to $filename_half?
- How do I properly escape data for a Makefile?
- Reading input files by line using read command in shell scripting skips last line
- How to echo a variable containing an unescaped dollar sign in bash
- Returning a boolean from a Bash function
- Ignoring specific errors in a shell script
- Is there a way to avoid positional arguments in bash?
- escaping newlines in sed replacement string
- Grep and regex – why am I escaping curly braces?
- How to wait on all child (and grandchild etc) process spawned by a script
- Do I need to quote command substitutions?