On 9/9/25 1:39 PM, wwp via users wrote:
Hello ToddAndMargo,


On Tue, 9 Sep 2025 11:50:57 -0700 ToddAndMargo via users 
<[email protected]> wrote:

Hi All,

I know how to do this in Raku (Perl 6), but how do I assist
the return values of this zenity call inside a bash
script to separate variables?


$ zenity --forms --title="Create user" --text="Add new user" --add-entry="First Name"    --add-entry="Last Name" 
--add-entry="Username"    --add-password="Password" --add-password="Confirm Password"    --add-calendar="Expires"

aaa|bbb|ccc|ddd|ddd|09/10/2025

A bash approach, using simple arrays:

$ IFS='|'
$ declare -a ARRAY=($(zenity --forms --title="Create user" --text="Add new user" --add-entry="First Name" --add-entry="Last 
Name" --add-entry="Username" --add-password="Password" --add-password="Confirm Password" --add-calendar="Expires"))
$ echo ${#ARRAY[@]} <- show the number of array cells
$ echo ${ARRAY[@]} <- show all array cells


Regards,


Thank you!
--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to