in reply to Re: Calling pax within a perl script (was stupid substitution question)
in thread Calling pax within a perl script (was stupid substitution question)
my $cmd = q{pax -r -f /home/kev/pax.tar -s'/\/home\/kev\/pax\//\/data\/kev\/atlanta\/emtex\/invoices\//p'};
When the directory name has several nodes and the filename being paxed/untarred is a variable I guess it isn't interpolating correctly
$command= q{pax -r -f $file -s'/DirPart1.DirPart2.DirPart3/SubDir\//\/data\/kev\/atlanta\/emtex\/invoices\//p'};
I have tried several variants of this, such as
$command= q{pax -r -f $file -s'/DirPart1\.DirPart2\.DirPart3\/SubDir\//\/data\/kev\/atlanta\/emtex\/invoices\//p'};
When running this I get the error:
A file or directory in the path name does not exist.
which makes me think the string isn't being interpolated correctly.
I can see how using a different delimiter would obviate the need for using backslashes in the first example that works,
but in the second example don't I need escape backslashes for the '.' if not for the subdir '/'?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Calling pax within a perl script (was stupid substitution question)
by JavaFan (Canon) on Aug 11, 2010 at 12:14 UTC | |
by viffer (Beadle) on Aug 12, 2010 at 03:41 UTC |