in reply to backslashes in shell commands
You escaped the backslash: that worked fine. What you didn't do was escape the single quotes.
#!/usr/bin/env perl use strict; use warnings; my $cmd = "printf \'I\\x27ll\'"; print $cmd . "\n"; print `$cmd` ."\n";
Output:
$ pm_sh_escape.pl printf 'I\x27ll' I'll
Update: Escaping the single quotes was not the answer - see discussion below.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backslashes in shell commands
by Anonymous Monk on Mar 09, 2013 at 04:24 UTC | |
by kcott (Archbishop) on Mar 09, 2013 at 05:36 UTC |