receiver.sh 464 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. #Run script for receiver as part of
  3. #Assignment 2
  4. #Computer Networks (CS 456)
  5. #Number of parameters: 4
  6. #Parameter:
  7. # $1: <host_address>
  8. # $2: <receiving_port_on_host>
  9. # $3: <receiveing_port_on_receiver>
  10. # $4: file_to_be_saved
  11. #For Python implementation
  12. if [ "$#" -ne 4 ];
  13. then
  14. echo "Program takes 4 parameters, which are a host address, host port, receiver's port, and filename to be saved"
  15. exit 1
  16. fi
  17. python3 receiver.py $1 $2 $3 $4