Ask for list (items seperated by comma), and save every item in new variable (variablenameX)

Viewed 17

I am writing a little Bash script. I need a script asking for list of names, and writing every item seperated by comma to new variable with number. first item to variable1, second item to variable2 and so on, but without limit - so we can end with item 192243 saved in variable192243.

Running script output should look like that:

Write list of packages, every item seperated by comma:

#i write
firefox, chromium-browser, telegram-desktop, plasma-meta, konsole 

And then firefox is in variable1, chromium-browser in variable2 and so on.

Any ideas? I will be really grateful :)

0 Answers
Related