-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
A-CLIArea: CLI, completions, exit codes oh myArea: CLI, completions, exit codes oh myC-enhancementCategory: New feature or requestCategory: New feature or request
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-CLIArea: CLI, completions, exit codes oh myArea: CLI, completions, exit codes oh myC-enhancementCategory: New feature or requestCategory: New feature or request