Advertisement
Guest User

Untitled

a guest
May 11th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. test | TEST)
  2.  
  3. echo "Please enter the Model Group no : "
  4.  
  5. read -r input_variable
  6.  
  7. if [[ ${#input_variable} -ne "7" ]]
  8.  
  9. then
  10.  
  11. echo "Please check the model group no given"
  12.  
  13. exit 1
  14.  
  15. fi
  16.  
  17. HOST=xxx
  18.  
  19. USER=xxx
  20.  
  21. PASSWORD=xxx
  22.  
  23. mypath="/path/test/ModelGroupFolders/$input_variable/"
  24.  
  25. ftp -inv $HOST <<- EOF > FTPLOG
  26.  
  27. fgrep "550 Failed to change directory" FTPLOG>& /dev/null
  28.  
  29. if [ $? -eq 0 ]
  30.  
  31. then
  32.  
  33. echo "ftp error"
  34.  
  35. else
  36.  
  37.  
  38. echo "ftp done"
  39.  
  40. fi
  41.  
  42. user $USER $PASSWORD
  43.  
  44. cd "$mypath"
  45.  
  46. pwd
  47.  
  48. mput x.csv
  49.  
  50. EOF
  51.  
  52. exit 1
  53.  
  54. read -r input_variable
  55.  
  56. if [[ ${#input_variable} -ne "7" ]]
  57.  
  58. then
  59.  
  60. echo "Please check the model group no given"
  61.  
  62. exit 1
  63.  
  64. fi
  65.  
  66. HOST=xxx
  67.  
  68. USER=xx
  69.  
  70. PASSWORD=xxx
  71. mypath="/work/gmp/test/ModelGroupFolders/$input_variable/inputs/causaldata/"
  72.  
  73. ftp -inv $HOST <<- EOF > FTPLOG
  74.  
  75. fgrep "550 Failed to change directory" FTPLOG >& /dev/null
  76.  
  77. if [ $? -eq 0 ]
  78.  
  79. then
  80.  
  81. echo "ftp error"
  82.  
  83. else
  84.  
  85. echo "ftp done"
  86.  
  87. fi
  88.  
  89. user $USER $PASSWORD
  90.  
  91. cd "$mypath"
  92.  
  93. pwd
  94.  
  95. mput x.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement