Passing args in bash such as the unix date command
<p>Sorry if this is poorly worded as I am new to shell script.</p>

<p>I'm trying to write a script and I want to take in args such as the unix date command does.</p>

<p>Example:</p>

<pre><code>$ date '+%I:%M %p'
08:45 PM
</code></pre>

<p>So how would I do something like this in my script?</p>

<hr>

<p>EDIT: What I'm trying to do in my script is pass arguments in the same fashion as the date command. </p>

<p>So if my script were to change all %a arguments to foo, it would do the following:</p>

<pre><code>$ ./myscript '%a bar'
foo bar
</code></pre>