Hi,
I have some problem with following command.
$path='pwd'.�/pack�;
When I check the value in the variable path , it give the following output
/tmp/new /pack
The pwd will be /tmp/new
Now the problem is the spaces is added between pwd and the appended path.
I need the output like /tmp/new/pack
Could you please help me how I can avoid the space.
Regards,
Kalai
zaxxon
2
What shell is this? Or Perl? PHP?
i added this command in perl script
zaxxon
4
Maybe write it like this:
root@isau02:/data/tmp/testfeld> cat mach.pl
$path=`pwd`;
$add="/pack";
chomp($path); # to remove the trailing newline
print $path . $add . "\n";
root@isau02:/data/tmp/testfeld> perl -wf ./mach.pl
/data/tmp/testfeld/pack
rikxik
5
$ pwd
/tmp
$ perl -e 'print $ENV{'PWD'} . "/pack\n"'
/tmp/pack
uniesh
6
This command gives output without space in ksh.