The third party scheduling application our enterprise uses doesn't execute rm
commands as expected. By this, I mean I expect the rm -f $filetoremove
to complete and then continue to the next line of code in the script.
But I need to get it to execute preferrably rm -f
.
Is there another method to remove a file without using rm
?
I tried > delete_foobar.file
but it just empties it without removing.
Additional information:
My work environment is a large enterpise. I write the .sh
script which I test outside the scheduling application. Outside the scheduling software, the rm -f $filetoremove
command works with a return code of 0
. However, the scheduling software does not register the 0
return code and immediately exits without running the remainder of the .sh
script. This is problematic and the vendor has acknowledged this defect.
I'm not privy to the details of the automation software nor the exact return codes it receives. All I know, is that my scripts don't run completely, when run via the automation software, if it contains rm
. This is why I'm looking for alternatives to rm
.
Yes, it is important that I remove the file once I've completed processing it.
rm
?rm
or if simple has a malformed$PATH
environment variable.rm
with, the error message ofrm
, the value of$PATH
when the application runsrm
. Most probablyrm
is working just fine on your system (and there is no better alternative), but the application invokes it incorrectly.