title: Update IPS to security group aws
body: <p>I am trying to update my security group of aws using a shell script. Here is my code. </p>
  
  <pre><code> #!/bin/bash
   Ip=$1
   #rotocol=$1
   port=$1
   aws ec2 authorize-security-group-ingress --group-id sg-id --protocol tcp --
   port $port --cidr $Ip
  </code></pre>
  
  <p>I am receiving the following error while running the script. </p>
  
  <blockquote>
    <p>port parameter should be of the form  (e.g. 22 or 22-25)</p>
  </blockquote>
  
  <p>How to update the security group using the shell?</p>