Skip to main content
1 of 3
glenn jackman
  • 88.5k
  • 16
  • 124
  • 179

Use "$@" instead of ${*} (see Special Parameters in the manual)

for f in "$@"; do 
    echo make sure you quote your "$variables" everywhere in the loop

    # ...

There's a shorthand for this:

for f; do ...
glenn jackman
  • 88.5k
  • 16
  • 124
  • 179