X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Ffunctions.sh;h=19b3cc6730a1b1f6b02edb6073f6a90dd64b708a;hp=56529b6e8bff21a55c9945fb78c459597eb30104;hb=c2751b31e55518d1791cd5b87adc842f4fbbee83;hpb=48c8cf8fe613327c8735fe61482039f210fcb443 diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 56529b6..19b3cc6 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -241,3 +241,12 @@ lst_setup_all () { do_rpc_nodes $list lst_setup } +### +# short_hostname +# +# Passed a single argument, strips everything off following and includes the first period. +# client-20.lab.whamcloud.com becomes client-20 +short_hostname() { + echo $(sed 's/\..*//' <<< $1) +} +