Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/bin/bash
- while :
- do
- read -r INPUT_STRING
- case $INPUT_STRING in
- test)
- echo "Please enter id no : "
- read -r input_variable
- if [[ ${#input_variable} -ne "7" ]]
- then
- echo "Please check the id no given"
- exit 1
- fi
- HOST=xxx
- USER=xxx
- PASSWORD=xxx
- ^Iftp -inv $HOST <<- EOF
- user $USER $PASSWORD
- cd /work/path//$input_variable/to/destination/
- mput x.csv
- ^IEOF
- ;;
- esac
- done
- ftp -inv $HOST <<-EOF
- user $USER $PASSWORD
- cd /work/test//$input_variable/path/to destination/
- mput x.csv
- EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement