Advertisement
Guest User

Untitled

a guest
Dec 19th, 2016
125
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. while :
  3. do
  4. read -r INPUT_STRING
  5. case $INPUT_STRING in
  6. test)
  7. echo "Please enter id no : "
  8. read -r input_variable
  9. if [[ ${#input_variable} -ne "7" ]]
  10. then
  11. echo "Please check the id no given"
  12. exit 1
  13. fi
  14. HOST=xxx
  15. USER=xxx
  16. PASSWORD=xxx
  17. ^Iftp -inv $HOST <<- EOF
  18. user $USER $PASSWORD
  19. cd /work/path//$input_variable/to/destination/
  20. mput x.csv
  21.  
  22. ^IEOF
  23. ;;
  24. esac
  25. done
  26.  
  27. ftp -inv $HOST <<-EOF
  28. user $USER $PASSWORD
  29. cd /work/test//$input_variable/path/to destination/
  30. mput x.csv
  31. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement