From 1f72c4442d54868eb7a5355eeeef8dcaf1677c4e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 4 Feb 2009 14:55:24 +0100 Subject: Added check_ssh function --- etc/functions/check_ssh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 etc/functions/check_ssh (limited to 'etc') diff --git a/etc/functions/check_ssh b/etc/functions/check_ssh new file mode 100644 index 0000000..26ee9fa --- /dev/null +++ b/etc/functions/check_ssh @@ -0,0 +1,6 @@ +## vim:ft=zsh +if [[ $(ssh $1 'echo foo' 2> /dev/null < /dev/null ) == foo ]] { + return 0 +} else { + return 1 +} -- cgit v1.2.3