Advertisement
Guest User

Untitled

a guest
May 4th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. test | TEST)
  2.  
  3. echo "Please enter id no : "
  4.  
  5. read -r input_variable
  6.  
  7. if [[ ${#input_variable} -ne "7" ]]
  8.  
  9. then
  10.  
  11. echo "Please check id no given"
  12.  
  13. exit 1
  14.  
  15. fi
  16.  
  17. HOST=XXX
  18.  
  19. USER=XXX
  20.  
  21. PASSWORD=XX
  22.  
  23. ftp -inv $HOST <<- EOF
  24.  
  25. user $USER $PASSWORD
  26.  
  27. mypath='/test/$input_variable/destination/'
  28.  
  29. if ! cd "$mypath"
  30.  
  31. then
  32.  
  33. exit 1
  34.  
  35. fi
  36.  
  37. mput x.csv
  38.  
  39. EOF
  40.  
  41. exit 1
  42.  
  43. ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement