This script uses command line arguments ($1 and $?) and tail out the /root/error.txt file.
#!/bin/bash
#usage of command line arguments
#!/bin/bash
#usage of command line arguments
rm
$1 2>>/root/error.txt
if
[ $? -eq 0 ]
then
echo
" Success "
else
tail
-1 /root/error.txt
fi
0 Comments:
Post a Comment