title: How do you reference a variable within a string in UNIX?
body: <p>I am writing a new script that creates aliases based on the results of an ls query. The script itself is simple enough, however what is hanging me up is the alias call. I cannot figure out how to reference the variable that I've generated in another string when I call the alias command:</p>
  
  <pre><code>for f in `ls -1 -O dir /dev/fs/`
  do
    fl=`echo $f | tr '[:upper:]' '[:lower:]'`
    alias "$fl"_drive='cd /dev/fs/$f'
  done
  </code></pre>
  
  <p>It's that reference to the $f variable in the alias call that's throwing me off. Can anyone shed some light on the proper syntax for this? Thanks in advance.</p>