i'm writting a script that will backup data from my laptop to an ubuntu server.to do so, i'm looking for a (ba)sh command to test if the server is available before starting the backup. something like ping on port 22 that returns a booleanhow can i do this ? thanks for helping 
How can i check that a remote computer is online for ssh / script acess?
shell;scripting;backup;ping
Like this:nc -z hostname 22 > /dev/nullecho $?If it's 0 then it's available. If it's 1 then it's not.