I want to check if my string contains one or more asterisks.
I have tried this:
if [[ $date_alarm =~ .*\*.* ]]
then
...
fi
It worked when I launch the script directly, but not if this script is called during shutdown (script installed in run level 0 and 6 via update-rc.d
)
Any idea, suggestion?
/bin/bash
as an interpreter, instead it will use/bin/sh
. – Punchball