#!/bin/bash
# demo of the difference $@ versus "$@" can make in
# a for loop when command-line arguments include blanks;
# (ideally, call it with at least one such command-line argument
# to see the difference!)
# by: Sharon Tuttle
# last modified: 10-10-12
# without the double quotes around $@,
# command-line arguments with blanks are
# "broken up" into separate arguments...
for i in $@
do
echo $i
done
# with double quotes around $@,
# you'll get the complete argument
for i in "$@"
do
echo $i
done