Commit 3e114c25 by Eric Coissac

simplify the on froggy and onluke function using regex

parent 62bd560f
Pipeline #22 skipped
......@@ -57,11 +57,11 @@ if [[ -z "${LECALIB_UTIL_SH}" ]]; then
function onluke() {
[[ $(hostname | sed -E 's/^(....).*$/\1/') == "luke" ]]
[[ $(hostname) =~ ^luke[0-9]+ ]]
}
function onfroggy() {
[[ $(hostname | sed -E 's/^(....).*$/\1/') == "frog" ]]
[[ $(hostname) =~ ^frog ]]
}
function pushd () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment