Remove first element from $@ in bash [duplicate]
Use shift
?
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_07.html
Basically, read $1
for the first argument before the loop (or $0
if what you're wanting to check is the script name), then use shift
, then loop over the remaining $@
.