title: bash script gives error - Argument list too long
body: <p>I wrote a bash script and below is the sample snippet that gives "Argument list too long" error.</p>
  
  <pre><code>param1=$1
  param2=$2
  'set ${param1} "${param2}"'
  </code></pre>
  
  <p>I know the size of param2 is huge (approx 15MB and can be more as well). I read several posts about ARG_MAX and breaking down things to smaller components.</p>
  
  <pre><code>getconf ARG_MAX
  67108864
  </code></pre>
  
  <p>Here the ARG_MAX size can easily accommodate something of size 15MB at least. So I am not sure what exactly is wrong here. Also, I am not sure if I can break this command down into smaller blocks. It's just one command which sets the whole value in one attempt.</p>
  
  <p>I also ran the below command to check data limits:</p>
  
  <pre><code>ulimit -d
  unlimited
  </code></pre>
  
  <p>Here we have unlimited size as well. Does anyone know how exactly I can bump up OS's limit to run these large commands? I am using CentOS Linux release 7.5.1804 (Core) with Kernel: 4.18.9.</p>