Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!/bin/bash
  2. export RUBYLIB=$RUBYLIB:.
  3. PDIR="puts_files"
  4. GDIR="gets_files"
  5. ODIR="output"
  6. HOST=""
  7. USER=""
  8. PASSWORD=""
  9. BIN="ruFTP.rb"
  10. PARAMS="$BIN -H $HOST -u $USER -p $PASSWORD"
  11.  
  12. rm -rf $PDIR $GDIR $ODIR
  13. mkdir $PDIR $GDIR $ODIR
  14.  
  15. echo "=== ls iniziale ==="
  16. ruby $PARAMS -c ls > $ODIR/first.ls
  17.  
  18. echo "=== Creo i file in locale ==="
  19. dd if=/dev/zero of=puts_files/bigfile bs=1024 count=1024
  20. dd if=/dev/zero of=puts_files/bigfile2 bs=1024 count=512
  21. echo "ciao mare" > puts_files/textfile.txt
  22.  
  23. echo "=== Carico i file ==="
  24. ruby $PARAMS -c put puts_files/*
  25.  
  26. echo "=== I file caricati sono ==="
  27. ruby $PARAMS -c ls
  28.  
  29. echo "=== Scarico i file ==="
  30. cd gets_files
  31. ruby -I ../ ../$PARAMS -c get bigfile2 bigfile textfile.txt
  32. cd ..
  33. echo "=== Cancello i file ==="
  34. ruby $PARAMS -c delete bigfile2 bigfile textfile.txt
  35.  
  36. echo "=== LS finale ==="
  37. ruby $PARAMS -c ls > $ODIR/second.ls
  38.  
  39. ls puts_files > $ODIR/puts.ls
  40. ls gets_files > $ODIR/gets.ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement