Solved

Unable to get atribute after using attr to set a attribute

Posted on 2013-05-09
4
326 Views
Last Modified: 2013-05-14
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_061459.tgz
0
Comment
Question by:pvinodp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 39154929
my $cmd1 = "attr -s svnVer -V 13716 $$archiveName"; #my command
How did you assign a scalar reference to $archiveName?
Did you mean
my $cmd1 = 'attr -s svnVer -V 13716 $$archiveName';


my $result1 = execute_command($cmd1);
How did you declare sub execute_command?
0
 

Author Comment

by:pvinodp
ID: 39154978
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
0
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 39154990
What is the already existing code that sets $archiveName?
What is the already existing code that declares sub  execute_command?
What do you get if you
  print $cmd1;
0
 

Author Closing Comment

by:pvinodp
ID: 39164477
thanks for your answers
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use question mark (?) in filename with html 25 138
python - find anything after $ question. 9 87
Windows 10 linux VM 30 93
Parsing RSyslog entries 5 12
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question