Produce a shell-safe quoted string.
Section: Encoding and Recursion
Shell-escape a string
bash
bash
echo '"hello world"' | jq -r '@sh'Explanation
Great when generating shell commands from JSON data.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Encoding and Recursion