What is the usage of the command quote
? I haven't found any info about it, it isn't among the executable files in /bin
folders, and it cannot be found among Bash built-ins. It seems that it only prints its first parameter, like an echo
command and nothing more.
Ubuntu – “quote” command in the shell
bashcommand line
Related Question
- Ubuntu – How to get current gnome keyboard layout from terminal
- Ubuntu – Can you help me to understand this explanation of shell quoting
- Ubuntu – How to run commands from a bash file the way they run from terminal
- Ubuntu – Create bash script that allows you to choose multiple options instead of just one
- Ubuntu – the purpose of the special parameter “_” (single underscore) in environment
Best Answer
What is it?
I noticed that this command does not work in my shell (fish, friendly interactive shell). It seems like it does only work in bash (Ubuntu's default).
What does it do? What can it be used for?
It adds the quotes but no newline. It also escapes single quotes in a way that's suitable for bash. It can be useful in scripts to quote a variable or some other kind of string. You need this for example for paths/parameters with spaces. Although there are other ways to do this.
It's really strange I could not find any documentation (in the web) about it. But well, it's easy to see what it does.