I want to use my script on many files sometimes.I used this for the purpose:for etminput in $1do    #processdoneBut this just gives the first input.How can I do the process on every wildcard matches?
Loop in WildCard as Input of Script
shell script;wildcards;for
If you want to loop over all the arguments to your script, in any Bourne like shell, it's:for i do  something with $idoneYou could also do:for i in $@; do  something with $idonebut it's longer and not as portable (though is for modern shells).Note that:for i; do  something with $idoneis neither Bourne nor POSIX so should be avoided (though it works in many shells)For completeness, in non-Bourne shells:csh/tcsh@ i = 1while ($i <= $#argv)  something with $argv[$i]:q  @ i++endYou cannot use:foreach i ($argv:q)  something with $i:qendbecause that skips empty argumentsrc/akangafor (i) something with $i(rc generally is what shells should be like).esfor (i=$*) something with $i(es is rc on steroids).fishfor i in $argv  something with $iendzshThough it will accept the Bourne syntax, it also supports shorter ones like:for i ($@) something with $i