3 ms·
In Bash ≥ 4.4, you can also use parameter transformations: function quote() { echo "${@@Q}" } (In both cases, the generated output is understood
by jwilk 7y ago
In Bash ≥ 4.4, you can also use parameter transformations:
function quote() {
echo "${@@Q}"
}
(In both cases, the generated output is understood bash, but not necessarily by other POSIX-compliant shells.)