Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- export RUBYLIB=$RUBYLIB:.
- PDIR="puts_files"
- GDIR="gets_files"
- ODIR="output"
- HOST=""
- USER=""
- PASSWORD=""
- BIN="ruFTP.rb"
- PARAMS="$BIN -H $HOST -u $USER -p $PASSWORD"
- rm -rf $PDIR $GDIR $ODIR
- mkdir $PDIR $GDIR $ODIR
- echo "=== ls iniziale ==="
- ruby $PARAMS -c ls > $ODIR/first.ls
- echo "=== Creo i file in locale ==="
- dd if=/dev/zero of=puts_files/bigfile bs=1024 count=1024
- dd if=/dev/zero of=puts_files/bigfile2 bs=1024 count=512
- echo "ciao mare" > puts_files/textfile.txt
- echo "=== Carico i file ==="
- ruby $PARAMS -c put puts_files/*
- echo "=== I file caricati sono ==="
- ruby $PARAMS -c ls
- echo "=== Scarico i file ==="
- cd gets_files
- ruby -I ../ ../$PARAMS -c get bigfile2 bigfile textfile.txt
- cd ..
- echo "=== Cancello i file ==="
- ruby $PARAMS -c delete bigfile2 bigfile textfile.txt
- echo "=== LS finale ==="
- ruby $PARAMS -c ls > $ODIR/second.ls
- ls puts_files > $ODIR/puts.ls
- ls gets_files > $ODIR/gets.ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement