title: linux shell script to zip all files
body: <p>This is example path of my application</p>
  
  <pre><code>/var/www/html/folder1/folder2/folder3/
  </code></pre>
  
  <p>I need to fetch all 90 days older files of "folder3" and save them as a zip file named "folder2" using a shell script. I tried writing some piece of code in shell script:-</p>
  
  <pre><code>filaname = awk -F/ '{print $(NF-1)}' &lt;&lt;&lt; "/var/www/html/folder1/folder2/folder3/"
  
  #above command retuns folder2
  
  zip filaname find /var/www/html/folder1/folder2/folder3/* -ctime -90 
  </code></pre>
  
  <p>i was trying to send output of <strong>find</strong> command to <strong>zip</strong> command but it did not work.</p>
  
  <p>Can someone please suggest how can i achieve this.</p>