output a file with a variable name in shell
<p>So I am trying to output a file with the name of like: lastlogin-"yyyymmdd" where it contains the current date.
I figured out the date should be : <code>date +"%Y%m%d"</code>  and I tried to do a variable </p>

<p><code>now = date +"lastlogin-%Y%m%d.txt"
 filename = ${now}
 xxxxx &gt; ${filename}</code>
but nothing seems to work</p>

<p>Please help </p>