my @abc;
use constant command1 =>"/usr/sbin/show -a"; -- This interface output
# Add other interface with same but result will be same for second.
&execCmd("root","root",$const->command1,\@abc);
if(($$_[2]== same){
my $data = &second($self,$$_[0],$StatusID,$$_[2],\@abc);
if (defined($$_[4]) && $data ne $$_[4]) {
push @sqls, "UPDATE table SET column1='$data' WHERE name='$$_[0]'";
sub second(){
if ((($StatusId eq $const->ok)){
foreach (@$abc) {
if(/^\s*(.+)\s*:\s*\/export\/\Q$exportName\E\s*$/){
if ($data eq "") {
$data = $1;
}
else {
$data = $data.$const->TMP_FILE_SPLITTER_2.$1;
}
}
Add same other command and command result will be same as first command1.
Aucun commentaire:
Enregistrer un commentaire