I’m sure this has come up before, but — [
is actually a command. You need a space after the [
in order for the shell to find it.
More Related Contents:
- How to delete from a text file, all lines that contain a specific string?
- How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
- How to use SSH to run a local shell script on a remote machine?
- Find and replace in file and overwrite file doesn’t work, it empties the file
- Global environment variables in a shell script
- What are the uses of the exec command in shell scripts? [closed]
- How can I reverse the order of lines in a file?
- Insert line after match using sed
- Can GNU make handle filenames with spaces?
- What is the difference between $@ and $* in shell scripts?
- How to remove carriage return from a variable in shell script
- Using awk with variables
- Shell command to find lines common in two files
- using alias in shell script? [duplicate]
- How to get the second column from command output?
- How do I get the effect and usefulness of “set -e” inside a shell function?
- How to exclude this / current / dot folder from find “type d”
- How to ssh to vagrant without actually running “vagrant ssh”?
- How to check if a process is running inside docker container?
- Make a keybinding to run previous or last shell commands
- How to set child process’ environment variable in Makefile
- How to source a script in a Makefile?
- How do I prevent root access to my docker container
- How to run a command in the background and get no output?
- How to input automatically when running a shell over SSH?
- How to call a function in shell Scripting?
- ${BASH_SOURCE[0]} equivalent in zsh?
- Pass groovy variable to shell script
- Awk replace a column with its hash value
- Call a Unix Script from Excel Vba