Skip to content

Instantly share code, notes, and snippets.

@mainframed
Created August 18, 2017 19:53
Show Gist options
  • Save mainframed/2bafc913db2d168508fc6c5d9fff650d to your computer and use it in GitHub Desktop.
Save mainframed/2bafc913db2d168508fc6c5d9fff650d to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "[+] Mainframe Upload Script"
if [ "$#" -ne 5 ]; then
echo "[!] Usage:" $0 "host username password PDS filename"
exit -1
fi
echo "[>] Connecting to" $1 " as" $2 "and uploading"
echo "[>] Uploading" $5 "to PDS" $4
ftp -n <<EOF
open $1
prompt
user $2 $3
cd $4
put $5
bye
EOF
echo "[+] Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment