client.sh 684 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. #Run script for client distributed as part of
  3. #Assignment 1
  4. #Computer Networks (CS 456)
  5. #Number of parameters: 4
  6. #Parameter:
  7. # $1: <server_address>
  8. # $2: <n_port>
  9. # $3: <req_code>
  10. # $4: message
  11. #Uncomment exactly one of the following commands depending on your implementation
  12. #For C/C++ implementation
  13. #./client $1 $2 $3 "$4"
  14. #For Java implementation
  15. #java client $1 $2 $3 "$4"
  16. #For Python implementation
  17. if [ "$#" -ne 4 ];
  18. then
  19. echo "Program takes 4 parameters, which are a server address, server port, req_code, and string (in quotes) to be reversed"
  20. exit 1
  21. fi
  22. python3 client.py $1 $2 $3 "$4"
  23. #For Ruby implementation
  24. #ruby client.rb $1 $2 $3 "$4"