Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test | TEST)
- echo "Please enter the Model Group no : "
- read -r input_variable
- if [[ ${#input_variable} -ne "7" ]]
- then
- echo "Please check the model group no given"
- exit 1
- fi
- HOST=xxx
- USER=xxx
- PASSWORD=xxx
- mypath="/path/test/ModelGroupFolders/$input_variable/"
- ftp -inv $HOST <<- EOF > FTPLOG
- fgrep "550 Failed to change directory" FTPLOG>& /dev/null
- if [ $? -eq 0 ]
- then
- echo "ftp error"
- else
- echo "ftp done"
- fi
- user $USER $PASSWORD
- cd "$mypath"
- pwd
- mput x.csv
- EOF
- exit 1
- read -r input_variable
- if [[ ${#input_variable} -ne "7" ]]
- then
- echo "Please check the model group no given"
- exit 1
- fi
- HOST=xxx
- USER=xx
- PASSWORD=xxx
- mypath="/work/gmp/test/ModelGroupFolders/$input_variable/inputs/causaldata/"
- ftp -inv $HOST <<- EOF > FTPLOG
- fgrep "550 Failed to change directory" FTPLOG >& /dev/null
- if [ $? -eq 0 ]
- then
- echo "ftp error"
- else
- echo "ftp done"
- fi
- user $USER $PASSWORD
- cd "$mypath"
- pwd
- mput x.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement