La siguiente secuencia de comandos convierte su prueba "al revés" en el sentido de que primero probamos $var
y luego realizamos el fallthrough (usando ;&
en uncase
)dependiendo de $input
.
Hacemos esto porque la cuestión de si "realizar o no la falla" realmente solo depende de $input
si $var
es 1
. Si se trata de cualquier otro valor, ni siquiera es necesario plantearse la cuestión de si se debe realizar el fallthrough.
#/bin/bash
input='foo'
var='1'
case $var in
1)
case $input in
foo)
echo 'perform fallthrough'
;&
*)
echo 'fallthough worked'
esac
;;
*)
echo 'what fallthrough?'
esac
O, sincase
:
if [ "$var" -eq 1 ]; then
if [ "$input" = 'foo' ]; then
echo 'perform fallthrough'
fi
echo 'fallthough worked'
else
echo 'what fallthrough?'
fi
Вы также читали примеры на qnx man mount?
mount -e
This will re-read the disk partition table for /dev/hd0, and create, update or delete /dev/hd0tXX block-special files for each partition.
С вашей командой ssh это имеет смысл. понимаю не много.