title: Progress indicator in bash for loop
body: <p>How can I add progress percentage in the for loop of bash script. Below is one example of the script in which for loop takes a lot of time due to huge data. I would like to know the complete percentage of the for loop.</p>
  <pre><code>for domain in $(cat all-programs.txt); do
     cat 2020.json.gz | pigz -dc | grep &quot;.$domain&quot; | cut -d &quot;,&quot; -f2 | cut -d &quot;:&quot; -f2 | cut -d '&quot;' -f2 | sed '/^$domain/d' | sort -u | grep -w &quot;$domain&quot; 2&gt;/dev/null &gt;&gt; all.txt; done
  </code></pre>