pvinodp
asked on
Unable to get atribute after using attr to set a attribute
Following a perl file :
//mBackup
#!/usr/bin/perl
...
...
my $cmd1 = "attr -s svnVer -V 13716 $$archiveName"; #my command
my $result1 = execute_command($cmd1);
print LOG "svnVer set : $result1 on $$archiveName \n";
------
I do see that the $result1 is set as 0. But when i query the file using
attr -g svnVer $$archiveName, i get:
attr_get: No data available
Could not get "svnVer" for /es/ss.bkup.3.0.10May13_06 1459.tgz
//mBackup
#!/usr/bin/perl
...
...
my $cmd1 = "attr -s svnVer -V 13716 $$archiveName"; #my command
my $result1 = execute_command($cmd1);
print LOG "svnVer set : $result1 on $$archiveName \n";
------
I do see that the $result1 is set as 0. But when i query the file using
attr -g svnVer $$archiveName, i get:
attr_get: No data available
Could not get "svnVer" for /es/ss.bkup.3.0.10May13_06
ASKER
Actually I copied the lines from already existing code..
my $cmd = "cd $backup::tempDir; /bin/tar zcf $$archiveName $archives";
my $result = execute_command($cmd);
#The above execution of command is successful. SO I used it to do my job. And all these 4 lines are consecutive lines. SO no access issues....
my $cmd1 = "attr -s svnVer -V 13716 $$archiveName";
my $result1 = execute_command($cmd1);
s
my $cmd = "cd $backup::tempDir; /bin/tar zcf $$archiveName $archives";
my $result = execute_command($cmd);
#The above execution of command is successful. SO I used it to do my job. And all these 4 lines are consecutive lines. SO no access issues....
my $cmd1 = "attr -s svnVer -V 13716 $$archiveName";
my $result1 = execute_command($cmd1);
s
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for your answers
Did you mean
my $cmd1 = 'attr -s svnVer -V 13716 $$archiveName';
How did you declare sub execute_command?