I have tried:
sd "${file}.*\n?" "" "$BATCH_FILE" && echo -e "\033[0;34m$ICON_SUCCESS Lines containing $file removed from $BATCH_FILE\033[0m"
and
if sd "${file}.*\n?" "" "$BATCH_FILE"; then
echo -e "\033[0;34m$ICON_SUCCESS Lines containing $file removed from $BATCH_FILE\033[0m"
fi
and
sd "${file}.*\n?" "" "$BATCH_FILE"
if [[ $? -eq 0 ]]; then
echo -e "\033[0;34m$ICON_SUCCESS Lines containing $file removed from $BATCH_FILE\033[0m"
fi
It echoes line even if the command fails.
how to identify if sd command failed?
I have tried:
and
and
It echoes line even if the command fails.
how to identify if sd command failed?