sub to_sh_literal { my ($s) = @_; # Assuming bourne shell. $s =~ s/'/'\\''/g; $s = "'$s'"; return $s; }