You must wrap the $@
in quotes, too: "$@"
This tells the shell to ignore spaces in the arguments; it doesn’t turn all arguments into a very long string.
More Related Contents:
- shell – remove numbers from a string column [closed]
- What’s the difference between .bashrc, .bash_profile, and .environment?
- How can I parse a YAML file from a Linux shell script?
- How to read a file into a variable in shell?
- Shell command to sum integers, one per line?
- How to make grep only match if the entire line matches?
- How can I execute a command stored in a variable?
- What does $$ mean in the shell?
- Unix time and leap seconds
- What is the $? (dollar question mark) variable in shell scripting? [duplicate]
- How to insert a newline in front of a pattern?
- How do you tell if a string contains another string in POSIX sh?
- How to mark a build unstable in Jenkins when running shell scripts
- Rearrange columns using cut
- How can I redirect the output of the “time” command?
- is it possible to use variables in remote ssh command?
- CMake’s execute_process and arbitrary shell scripts
- Permission denied at hdfs
- How to do multiline shell script in Ansible
- How to execute a shell script on a remote server using Ansible?
- How to source a script in a Makefile?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- How to grep a text file which contains some binary data?
- How can I pass variables from awk to a shell command?
- Read file into String and do a loop in Expect Script
- Which terminal command to get just IP address and nothing else?
- How to add text at the end of each line in unix
- How to print 5 consecutive lines after a pattern in file using awk [duplicate]
- how do I use the grep –include option for multiple file types?
- Batch convert latin-1 files to utf-8 using iconv