0

User will input the folders varying in number but maximum 10, separated by a comma and in the end specify the name of the output file

./script.sh folder1,folder2,folder3,folder4 -o output.csv
./script.sh folder1,folder2,folder3, -o output.csv
pavelsaman
  • 7,399
  • 1
  • 14
  • 32
foondar
  • 45
  • 4
  • 1
    Why do it this way instead of having them be separate arguments? – Barmar Jun 04 '20 at 17:51
  • you could have it simple with *positional parameters* (as @Barmar suggested), arguments can be treated like usual folder names (containing spaces) for example *'./script.sh folder1 "folder 2" folder\ 3 -o output.csv'* – alecxs Jun 04 '20 at 22:32

0 Answers0