title: /usr/bin/jq: Argument list too long error bash
body: <p>I want to replace the value in sample json from larger swagger.json file content and it is too large.</p>
  
  <pre><code>Error:
  /usr/bin/jq: Argument list too long error bash 
  </code></pre>
  
  <p>worked to solve this issue for a few days and cannot identify the issue here.
  this is the sample json file:</p>
  
  <pre><code>{
     "name": "",
     "description": "",
     "context": "",
     "version": "",
     "provider": "cbs",
     "apiDefinition": "",
     "wsdlUri": null,
     "responseCaching": "Disabled",
     "cacheTimeout": 300,
     "destinationStatsEnabled": false,
     "isDefaultVersion": true,
     "transport":    [
        "http",
        "https"
     ],
     "tags": ["PROVIDER_","MIFE"],
     "tiers": ["Unlimited","Default","Silver","Subscription","Gold","Premium","Bronze"],
     "maxTps":    {
        "sandbox": 5000,
        "production": 1000
     },
     "visibility": "PUBLIC",
     "visibleRoles": [],
     "endpointConfig": "",
     "endpointSecurity":    {
        "username": "user",
        "type": "basic",
        "password": "pass"
     },
     "gatewayEnvironments": "Production and Sandbox",
     "sequences": [],
     "subscriptionAvailability": null,
     "subscriptionAvailableTenants": [],
     "businessInformation":    {
        "businessOwnerEmail": "BUSINESSOWNEREMAIL_",
        "technicalOwnerEmail": "TECHNICALOWNEREMAIL_",
        "technicalOwner": "TECHNICALOWNER_",
        "businessOwner": "BUSINESSOWNER_"
     },
     "corsConfiguration":    {
        "accessControlAllowOrigins": ["*"],
        "accessControlAllowHeaders":       [
           "authorization",
           "Access-Control-Allow-Origin",
           "Content-Type",
           "SOAPAction"
        ],
        "accessControlAllowMethods":       [
           "GET",
           "PUT",
           "POST",
           "DELETE",
           "PATCH",
           "OPTIONS"
        ],
        "accessControlAllowCredentials": false,
        "corsConfigurationEnabled": false
     }
  }
  </code></pre>
  
  
  
  <ul>
  <li>swagger.json file - <a href="https://drive.google.com/file/d/18ol5s7zjtviK73z6-CzRLCROOo_y_ivg/view?usp=sharing" rel="nofollow noreferrer">Click here to download swagger.json file</a></li>
  </ul>
  
  <p>this is the command i using and it give me a error which i as arguments too large. </p>
  
  <pre><code>swagger = $(cat swagger.json)
  
  jq -r --arg swagger "$swagger" '.apiDefinition = $swagger' &lt;&lt;&lt;"$json"
  </code></pre>
  
  <p>Can anyone please help!</p>
  
  <p>swagger = $(cat swagger.json)</p>