w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Amount of positional parameters in Linux shell script

You can loop through all the elements with $@:

for dir in "$@"
   mv "$dir"/* /tmp

So that you don't have to know in advance how many parameters you are getting.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.