#!/bin/sh clear echo "CloneIt: Client based on netpipes 4.0 ..." echo dialog \ --title "Client: What is the server IP?" \ --backtitle "CloneIt" \ --inputbox "Enter the IP number of the server (i.e. 192.168.0.1)." \ 9 60 \ 2>/tmp/dialog.out ERR="$?" if [ "$ERR" != "0" ]; then exit; fi SERVER=`cat /tmp/dialog.out` dialog \ --title "Client: Where do you want to write the file (GZIPed image) to?" \ --backtitle "CloneIt" \ --inputbox "Enter the filename where the data gets written to)." \ 9 60 \ 2>/tmp/dialog.out ERR="$?" if [ "$ERR" != "0" ]; then exit; fi FILENAME=`cat /tmp/dialog.out` dialog \ --title "Client: Ready to copy the data from $SERVER to $FILENAME?" \ --backtitle "CloneIt" \ --msgbox "Press OK to continue when the server is running." \ 7 60 ERR="$?" if [ "$ERR" != "0" ]; then exit; fi clear echo "CloneIt: Hose is receiving data from $SERVER and writing it to $FILENAME now." echo hose $SERVER 1775 --in --verbose sh -c "cat >$FILENAME" echo echo "CloneIt: The transfer is completed." echo