title: bash - how to pass arg values to shell script within in a cronjob
body: <p>I have cron entry that looks like this which works: (passing in 5 inputs)</p>
  
  <pre><code>30 10 * * 5 sh /home/test.sh hostnm101.abc /mypath/dir test foobar F008AR &gt;&gt; /logs/mytst.log 2&gt;&amp;1
  </code></pre>
  
  <p>I want to change it so I store inputs (4,5) <code>foobar</code> and <code>F008AR</code> in a separate file and read in by
  script test.sh ($4,$5)</p>
  
  <p>test.sh</p>
  
  <pre><code>#!/bin/bash
  
  if [ $# != 5 ]; then
      exit 1
  fi
  
  DIRDT=`date '+%Y%m%d'`
  TSTDIR=$2/test/$DIRDATE
  [ ! -d "$TSTDIR" ] &amp;&amp; ( mkdir "$TSTDIR" || { echo 'mkdir command failed'; exit 1; } )
  
  perl /home/dev/tstextr.pl -n $1 -b $2 -d $TSTDIR/ -s $3 -u $4 -p $5 -f $DIRDT
  </code></pre>
  
  <p>Is there any easy way to do this within the cron for those (2) input values? Thanks.</p>