I am trying to create a success and fail as below in a perl script :
while echo$? is 2 it should append as below to .fail file
=====================
if ( open(IN, "$outputfile"))
{
while( $my_line = <IN> )
{
#print "$my_line \n" ;
return 0;
}
system("echo \"FA_PATCH_CHECK failed on $node $vm:\" >> $INITDIR/$RAND/FA_PATCH_CHECK.fail");
return 2;
}
======
I am not able to see this file, is there a better way to do ?
Please advice.
---------- Post updated at 05:41 AM ---------- Previous update was at 03:54 AM ----------
"$outputfile" above is a command which is being run:
Just a simple question
if command successfull then .sucess file gets created , if command not exists or unsucessfull switch used then .diff file gets created