title: bash: filenames as parameter, perform action in cycle
body: <p>My current script goes like:</p>
  
  <pre><code>#!/bin/bash
  
  victims=*asci*
  
  for f in $victims ; do
  awk /some blah blah here/  ;done
  </code></pre>
  
  <p>so basically takes all files containing <em>ascii</em> in their name and performs an action on them.</p>
  
  <p>I wanted, however, the filenames be entered as a parameter. Like:
  <code>bash myscript.sh *log*</code> for example.</p>
  
  <p>When using</p>
  
  <pre><code>#!/bin/bash
  
  victims="$1"
  
  for f in $victims ; do
  awk /some blah blah here/  ;done
  </code></pre>
  
  <p>it doesnt do what expected. Performs only on the first file (as far as I remember).</p>
  
  <p>May I ask for a help? Want the script to perform a function over a bunch of files that contain the parameter in their filename. Im not very experienced in bash, honestly. Thanks, cheers!</p>