title: replacing first pattern using sed
body: <p>I have a cron job with below details</p>
  <p>The timing section is unknown, it might be hourly or daily.</p>
  <pre><code>cat zyx.txt
  
  SHELL=/bin/bash
  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  0 * * * * root /usr/local/bin/log-cleaner
  </code></pre>
  <p>I have to update it on the fly using sed, so that it should run every minute .</p>
  <p>Here is what I have tried</p>
  <pre><code>sed -in 's/\(.*\) \(.*\) \(.*\)/\* \* \* \* \*/1' zyx.txt
  </code></pre>
  <p>But it is removing the user and path section</p>
  <pre><code>cat zyx.txt
  
  SHELL=/bin/bash
  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  * * * * *
  </code></pre>
  <p>Any help / suggestion using sed is much appreciated</p>