How to generate username & password hotspot by script

dear all

Pls help how show username & password hotspot by script in terminal, how to auto generat username password.

:foreach i in=[/ip hotspot user find] do={
:put “$[/ip hotspot user get $i name]: $[/ip hotspot user get $i password]”;
}

/ip hotspot user add name=Name password=Pass