Components

24 Twig Components
82 Render Count
204 ms Render Time
12.0 MiB Memory Usage

Components

Name Metadata Render Count Render Time
settings_row_switch
"App\Twig\Components\SettingsRowSwitchComponent"
components/_settings_row_switch.html.twig
15 3.97ms
date
"App\Twig\Components\DateComponent"
components/date.html.twig
8 1.51ms
user_inline
"App\Twig\Components\UserInlineComponent"
components/user_inline.html.twig
7 1.83ms
date_edited
"App\Twig\Components\DateEditedComponent"
components/date_edited.html.twig
6 0.68ms
vote
"App\Twig\Components\VoteComponent"
components/vote.html.twig
6 2.33ms
boost
"App\Twig\Components\BoostComponent"
components/boost.html.twig
6 7.16ms
entry_comment
"App\Twig\Components\EntryCommentComponent"
components/entry_comment.html.twig
5 118.68ms
user_avatar
"App\Twig\Components\UserAvatarComponent"
components/user_avatar.html.twig
5 3.62ms
entry_comments_nested
"App\Twig\Components\EntryCommentsNestedComponent"
components/_cached.html.twig
5 75.19ms
user_settings_row_switch
"App\Twig\Components\UserSettingsRowSwitchComponent"
components/_user_settings_row_switch.html.twig
4 0.65ms
settings_row_enum
"App\Twig\Components\SettingsRowEnumComponent"
components/_settings_row_enum.html.twig
2 0.52ms
entry
"App\Twig\Components\EntryComponent"
components/_cached.html.twig
1 8.35ms
entries_cross
"App\Twig\Components\EntriesCrossComponent"
components/_cached.html.twig
1 69.06ms
editor_toolbar
"App\Twig\Components\EditorToolbarComponent"
components/editor_toolbar.html.twig
1 0.23ms
user_actions
"App\Twig\Components\UserActionsComponent"
components/user_actions.html.twig
1 1.71ms
magazine_box
"App\Twig\Components\MagazineBoxComponent"
components/magazine_box.html.twig
1 8.34ms
magazine_sub
"App\Twig\Components\MagazineSubComponent"
components/magazine_sub.html.twig
1 0.75ms
related_magazines
"App\Twig\Components\RelatedMagazinesComponent"
components/_cached.html.twig
1 2.70ms
active_users
"App\Twig\Components\ActiveUsersComponent"
components/_cached.html.twig
1 0.34ms
related_categories
"App\Twig\Components\RelatedCategoriesComponent"
components/_cached.html.twig
1 4.63ms
related_posts
"App\Twig\Components\RelatedPostsComponent"
components/_cached.html.twig
1 1.39ms
related_entries
"App\Twig\Components\RelatedEntriesComponent"
components/_cached.html.twig
1 2.04ms
support_us_block
"App\Twig\Components\SupportUsBlock"
components/_cached.html.twig
1 0.20ms
featured_magazines
"App\Twig\Components\FeaturedMagazinesComponent"
components/_cached.html.twig
1 0.84ms

Render calls

entry App\Twig\Components\EntryComponent 12.0 MiB 8.35 ms
Input props
[
  "entry" => App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
  "isSingle" => true
  "showShortSentence" => false
  "showBody" => true
]
Attributes
[
  "class" => "entry--single section--top"
]
Component
App\Twig\Components\EntryComponent {#2955
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
  -newCommentMarkerCount: App\Kbin\NewCommentMarker\NewCommentMarkerCount {#2956 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  +entry: App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
  +isSingle: true
  +showShortSentence: false
  +showBody: true
  +showMagazineName: false
  +canSeeTrash: false
  +newComments: 0
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.35 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#3254
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.39 ms
Input props
[
  "date" => DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#3324
  +date: DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.20 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
  "editedAt" => DateTimeImmutable @1729128865 {#1793
    date: 2024-10-17 03:34:25.0 +02:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#3388
  +createdAt: DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
  +editedAt: DateTimeImmutable @1729128865 {#1793
    date: 2024-10-17 03:34:25.0 +02:00
  }
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.44 ms
Input props
[
  "subject" => App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#3453
  +subject: App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
  +formDest: "entry"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 1.16 ms
Input props
[
  "subject" => App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#3519
  +formDest: "entry"
  +subject: App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entries_cross App\Twig\Components\EntriesCrossComponent 12.0 MiB 69.06 ms
Input props
[
  "entry" => App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\EntriesCrossComponent {#3833
  +entry: App\Entity\Entry {#2400
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +magazine: App\Entity\Magazine {#265
      +icon: Proxies\__CG__\App\Entity\Image {#246 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#275
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#237 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
      +entries: Doctrine\ORM\PersistentCollection {#180 …}
      +posts: Doctrine\ORM\PersistentCollection {#138 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
      +bans: Doctrine\ORM\PersistentCollection {#117 …}
      +reports: Doctrine\ORM\PersistentCollection {#103 …}
      +badges: Doctrine\ORM\PersistentCollection {#81 …}
      +logs: Doctrine\ORM\PersistentCollection {#71 …}
      +awards: Doctrine\ORM\PersistentCollection {#1346 …}
      +categories: Doctrine\ORM\PersistentCollection {#1823 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#269
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#271
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
    +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
    +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
    +url: null
    +body: """
      I am learning some bash scripting.\n
      \n
      I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
      \n
      Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
      \n
      What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
      \n
      For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
      </span>\n
      ```\n
      \n
      If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
      \n
      ```\n
      \n
      <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
      </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
      </span>\n
      ```\n
      \n
      Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 5
    +favouriteCount: 9
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1729147158 {#2414
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1688 …}
    +votes: Doctrine\ORM\PersistentCollection {#1966 …}
    +reports: Doctrine\ORM\PersistentCollection {#1965 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
    +badges: Doctrine\ORM\PersistentCollection {#2439 …}
    +children: []
    -id: 33597
    -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
    -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1706482025
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/9987356"
    +editedAt: DateTimeImmutable @1729128865 {#1793
      date: 2024-10-17 03:34:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706436525 {#2402
      date: 2024-01-28 11:08:45.0 +01:00
    }
  }
  -repository: App\Repository\EntryRepository {#270 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
}
editor_toolbar App\Twig\Components\EditorToolbarComponent 12.0 MiB 0.23 ms
Input props
[
  "id" => "entry_comment_68d7254064bdc7.98878905_body"
]
Attributes
[]
Component
App\Twig\Components\EditorToolbarComponent {#3958
  +id: "entry_comment_68d7254064bdc7.98878905_body"
}
entry_comment App\Twig\Components\EntryCommentComponent 12.0 MiB 20.54 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  "showNested" => true
  "dateAsUrl" => false
  "showMagazineName" => false
  "showEntryTitle" => false
]
Attributes
[]
Component
App\Twig\Components\EntryCommentComponent {#4398
  +comment: App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  +showMagazineName: false
  +showEntryTitle: false
  +showNested: true
  +level: 1
  +canSeeTrash: false
  +dateAsUrl: false
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.19 ms
Input props
[
  "user" => App\Entity\User {#4105
    +avatar: null
    +cover: null
    +email: "bizdelnick@lemmy.ml"
    +username: "@bizdelnick@lemmy.ml"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729132691 {#4162
      date: 2024-10-17 04:38:11.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
    +entries: Doctrine\ORM\PersistentCollection {#4099 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
    +posts: Doctrine\ORM\PersistentCollection {#4089 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
    +follows: Doctrine\ORM\PersistentCollection {#4220 …}
    +followers: Doctrine\ORM\PersistentCollection {#4213 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
    +reports: Doctrine\ORM\PersistentCollection {#4219 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
    +violations: Doctrine\ORM\PersistentCollection {#4216 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
    +awards: Doctrine\ORM\PersistentCollection {#4205 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
    +categories: Doctrine\ORM\PersistentCollection {#4206 …}
    -id: 69972
    -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
    +apId: "bizdelnick@lemmy.ml"
    +apProfileId: "https://lemmy.ml/u/bizdelnick"
    +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "bizdelnick"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729560999 {#4160
      date: 2024-10-22 03:36:39.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698940379 {#4159
      date: 2023-11-02 16:52:59.0 +01:00
    }
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#4454
  +user: App\Entity\User {#4105
    +avatar: null
    +cover: null
    +email: "bizdelnick@lemmy.ml"
    +username: "@bizdelnick@lemmy.ml"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729132691 {#4162
      date: 2024-10-17 04:38:11.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
    +entries: Doctrine\ORM\PersistentCollection {#4099 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
    +posts: Doctrine\ORM\PersistentCollection {#4089 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
    +follows: Doctrine\ORM\PersistentCollection {#4220 …}
    +followers: Doctrine\ORM\PersistentCollection {#4213 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
    +reports: Doctrine\ORM\PersistentCollection {#4219 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
    +violations: Doctrine\ORM\PersistentCollection {#4216 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
    +awards: Doctrine\ORM\PersistentCollection {#4205 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
    +categories: Doctrine\ORM\PersistentCollection {#4206 …}
    -id: 69972
    -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
    +apId: "bizdelnick@lemmy.ml"
    +apProfileId: "https://lemmy.ml/u/bizdelnick"
    +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "bizdelnick"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729560999 {#4160
      date: 2024-10-22 03:36:39.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698940379 {#4159
      date: 2023-11-02 16:52:59.0 +01:00
    }
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.15 ms
Input props
[
  "date" => DateTimeImmutable @1706445108 {#4166
    date: 2024-01-28 13:31:48.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#4509
  +date: DateTimeImmutable @1706445108 {#4166
    date: 2024-01-28 13:31:48.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.13 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706445108 {#4166
    date: 2024-01-28 13:31:48.0 +01:00
  }
  "editedAt" => DateTimeImmutable @1729132765 {#4103
    date: 2024-10-17 04:39:25.0 +02:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#4563
  +createdAt: DateTimeImmutable @1706445108 {#4166
    date: 2024-01-28 13:31:48.0 +01:00
  }
  +editedAt: DateTimeImmutable @1729132765 {#4103
    date: 2024-10-17 04:39:25.0 +02:00
  }
}
user_avatar App\Twig\Components\UserAvatarComponent 12.0 MiB 0.70 ms
Input props
[
  "user" => App\Entity\User {#4105
    +avatar: null
    +cover: null
    +email: "bizdelnick@lemmy.ml"
    +username: "@bizdelnick@lemmy.ml"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729132691 {#4162
      date: 2024-10-17 04:38:11.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
    +entries: Doctrine\ORM\PersistentCollection {#4099 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
    +posts: Doctrine\ORM\PersistentCollection {#4089 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
    +follows: Doctrine\ORM\PersistentCollection {#4220 …}
    +followers: Doctrine\ORM\PersistentCollection {#4213 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
    +reports: Doctrine\ORM\PersistentCollection {#4219 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
    +violations: Doctrine\ORM\PersistentCollection {#4216 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
    +awards: Doctrine\ORM\PersistentCollection {#4205 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
    +categories: Doctrine\ORM\PersistentCollection {#4206 …}
    -id: 69972
    -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
    +apId: "bizdelnick@lemmy.ml"
    +apProfileId: "https://lemmy.ml/u/bizdelnick"
    +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "bizdelnick"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729560999 {#4160
      date: 2024-10-22 03:36:39.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698940379 {#4159
      date: 2023-11-02 16:52:59.0 +01:00
    }
  }
  "width" => 40
  "height" => 40
  "asLink" => true
]
Attributes
[]
Component
App\Twig\Components\UserAvatarComponent {#4619
  +width: 40
  +height: 40
  +user: App\Entity\User {#4105
    +avatar: null
    +cover: null
    +email: "bizdelnick@lemmy.ml"
    +username: "@bizdelnick@lemmy.ml"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729132691 {#4162
      date: 2024-10-17 04:38:11.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
    +entries: Doctrine\ORM\PersistentCollection {#4099 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
    +posts: Doctrine\ORM\PersistentCollection {#4089 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
    +follows: Doctrine\ORM\PersistentCollection {#4220 …}
    +followers: Doctrine\ORM\PersistentCollection {#4213 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
    +reports: Doctrine\ORM\PersistentCollection {#4219 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
    +violations: Doctrine\ORM\PersistentCollection {#4216 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
    +awards: Doctrine\ORM\PersistentCollection {#4205 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
    +categories: Doctrine\ORM\PersistentCollection {#4206 …}
    -id: 69972
    -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
    +apId: "bizdelnick@lemmy.ml"
    +apProfileId: "https://lemmy.ml/u/bizdelnick"
    +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "bizdelnick"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729560999 {#4160
      date: 2024-10-22 03:36:39.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698940379 {#4159
      date: 2023-11-02 16:52:59.0 +01:00
    }
  }
  +asLink: true
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.40 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#4706
  +subject: App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  +formDest: "entry_comment"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 0.67 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#4763
  +formDest: "entry_comment"
  +subject: App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entry_comments_nested App\Twig\Components\EntryCommentsNestedComponent 12.0 MiB 10.48 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  "level" => 1
  "showNested" => true
  "view" => "tree"
]
Attributes
[
  "showNested" => true
]
Component
App\Twig\Components\EntryCommentsNestedComponent {#5010
  +comment: App\Entity\EntryComment {#4157
    +user: App\Entity\User {#4105
      +avatar: null
      +cover: null
      +email: "bizdelnick@lemmy.ml"
      +username: "@bizdelnick@lemmy.ml"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729132691 {#4162
        date: 2024-10-17 04:38:11.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
      +entries: Doctrine\ORM\PersistentCollection {#4099 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
      +posts: Doctrine\ORM\PersistentCollection {#4089 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
      +follows: Doctrine\ORM\PersistentCollection {#4220 …}
      +followers: Doctrine\ORM\PersistentCollection {#4213 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
      +reports: Doctrine\ORM\PersistentCollection {#4219 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
      +violations: Doctrine\ORM\PersistentCollection {#4216 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
      +awards: Doctrine\ORM\PersistentCollection {#4205 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
      +categories: Doctrine\ORM\PersistentCollection {#4206 …}
      -id: 69972
      -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
      +apId: "bizdelnick@lemmy.ml"
      +apProfileId: "https://lemmy.ml/u/bizdelnick"
      +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "bizdelnick"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729560999 {#4160
        date: 2024-10-22 03:36:39.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698940379 {#4159
        date: 2023-11-02 16:52:59.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1729147158 {#4167
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4155 …}
    +nested: Doctrine\ORM\PersistentCollection {#4153 …}
    +votes: Doctrine\ORM\PersistentCollection {#4151 …}
    +reports: Doctrine\ORM\PersistentCollection {#4149 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
    -id: 346905
    -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7821979"
    +editedAt: DateTimeImmutable @1729132765 {#4103
      date: 2024-10-17 04:39:25.0 +02:00
    }
    +createdAt: DateTimeImmutable @1706445108 {#4166
      date: 2024-01-28 13:31:48.0 +01:00
    }
  }
  +nestedComments: [
    347056 => App\Entity\EntryComment {#4374
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: App\Entity\EntryComment {#4157}
      +root: App\Entity\EntryComment {#4157}
      +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1706452051 {#4372
        date: 2024-01-28 15:27:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@bizdelnick@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4375 …}
      +nested: Doctrine\ORM\PersistentCollection {#4377 …}
      +votes: Doctrine\ORM\PersistentCollection {#4379 …}
      +reports: Doctrine\ORM\PersistentCollection {#4381 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
      -id: 347056
      -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/comment/6920864"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706452051 {#4373
        date: 2024-01-28 15:27:31.0 +01:00
      }
    }
  ]
  +level: 1
  +view: "tree"
  -entryCommentRepository: App\Repository\EntryCommentRepository {#556 …}
  -twig: Twig\Environment {#1252 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
entry_comment App\Twig\Components\EntryCommentComponent 12.0 MiB 9.12 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  "showNested" => true
  "level" => 2
  "showEntryTitle" => false
  "showMagazineName" => false
]
Attributes
[]
Component
App\Twig\Components\EntryCommentComponent {#5084
  +comment: App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  +showMagazineName: false
  +showEntryTitle: false
  +showNested: true
  +level: 2
  +canSeeTrash: false
  +dateAsUrl: false
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.17 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#5131
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.14 ms
Input props
[
  "date" => DateTimeImmutable @1706452051 {#4373
    date: 2024-01-28 15:27:31.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#5186
  +date: DateTimeImmutable @1706452051 {#4373
    date: 2024-01-28 15:27:31.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.09 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706452051 {#4373
    date: 2024-01-28 15:27:31.0 +01:00
  }
  "editedAt" => null
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#5240
  +createdAt: DateTimeImmutable @1706452051 {#4373
    date: 2024-01-28 15:27:31.0 +01:00
  }
  +editedAt: null
}
user_avatar App\Twig\Components\UserAvatarComponent 12.0 MiB 0.14 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  "width" => 40
  "height" => 40
  "asLink" => true
]
Attributes
[]
Component
App\Twig\Components\UserAvatarComponent {#5294
  +width: 40
  +height: 40
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +asLink: true
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.41 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#5363
  +subject: App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  +formDest: "entry_comment"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 3.40 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#5420
  +formDest: "entry_comment"
  +subject: App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entry_comments_nested App\Twig\Components\EntryCommentsNestedComponent 12.0 MiB 0.37 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  "level" => 2
  "showNested" => true
  "view" => "tree"
]
Attributes
[
  "showNested" => true
]
Component
App\Twig\Components\EntryCommentsNestedComponent {#5660
  +comment: App\Entity\EntryComment {#4374
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4157
      +user: App\Entity\User {#4105
        +avatar: null
        +cover: null
        +email: "bizdelnick@lemmy.ml"
        +username: "@bizdelnick@lemmy.ml"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729132691 {#4162
          date: 2024-10-17 04:38:11.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4106 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4108 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4101 …}
        +entries: Doctrine\ORM\PersistentCollection {#4099 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4096 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4094 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4092 …}
        +posts: Doctrine\ORM\PersistentCollection {#4089 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4087 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4085 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4082 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4080 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4078 …}
        +follows: Doctrine\ORM\PersistentCollection {#4220 …}
        +followers: Doctrine\ORM\PersistentCollection {#4213 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4203 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4192 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4165 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4223 …}
        +reports: Doctrine\ORM\PersistentCollection {#4219 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4217 …}
        +violations: Doctrine\ORM\PersistentCollection {#4216 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4215 …}
        +awards: Doctrine\ORM\PersistentCollection {#4205 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4208 …}
        +categories: Doctrine\ORM\PersistentCollection {#4206 …}
        -id: 69972
        -password: "$2y$13$CGr7IxQzToe2BmATC8Cd3ObJJrmQleZeNnXYTNdX2hZv7nioY2uJa"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4204 …}
        +apId: "bizdelnick@lemmy.ml"
        +apProfileId: "https://lemmy.ml/u/bizdelnick"
        +apPublicUrl: "https://lemmy.ml/u/bizdelnick"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "bizdelnick"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729560999 {#4160
          date: 2024-10-22 03:36:39.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698940379 {#4159
          date: 2023-11-02 16:52:59.0 +01:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: "Try something like `IFS=‘|’ read f1 f2 < <(zenity <…>)` where f1, f2 etc. are variable names."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1729147158 {#4167
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4155 …}
      +nested: Doctrine\ORM\PersistentCollection {#4153 …}
      +votes: Doctrine\ORM\PersistentCollection {#4151 …}
      +reports: Doctrine\ORM\PersistentCollection {#4149 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4117 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4121 …}
      -id: 346905
      -bodyTs: "'etc':12 'f1':6,10 'f2':7,11 'if':4 'like':3 'name':15 'read':5 'someth':2 'tri':1 'variabl':14 'zeniti':8"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/7821979"
      +editedAt: DateTimeImmutable @1729132765 {#4103
        date: 2024-10-17 04:39:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706445108 {#4166
        date: 2024-01-28 13:31:48.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4157}
    +body: "If you leave some of the field blank will it be able to skip assigning the respective variable? That’s one problem with the positional values."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706452051 {#4372
      date: 2024-01-28 15:27:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4375 …}
    +nested: Doctrine\ORM\PersistentCollection {#4377 …}
    +votes: Doctrine\ORM\PersistentCollection {#4379 …}
    +reports: Doctrine\ORM\PersistentCollection {#4381 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4383 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4385 …}
    -id: 347056
    -bodyTs: "'abl':12 'assign':15 'blank':8 'field':7 'leav':3 'one':21 'posit':25 'problem':22 'respect':17 'skip':14 'valu':26 'variabl':18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6920864"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706452051 {#4373
      date: 2024-01-28 15:27:31.0 +01:00
    }
  }
  +nestedComments: []
  +level: 2
  +view: "tree"
  -entryCommentRepository: App\Repository\EntryCommentRepository {#556 …}
  -twig: Twig\Environment {#1252 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
entry_comment App\Twig\Components\EntryCommentComponent 12.0 MiB 36.19 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  "showNested" => true
  "dateAsUrl" => false
  "showMagazineName" => false
  "showEntryTitle" => false
]
Attributes
[]
Component
App\Twig\Components\EntryCommentComponent {#5736
  +comment: App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  +showMagazineName: false
  +showEntryTitle: false
  +showNested: true
  +level: 1
  +canSeeTrash: false
  +dateAsUrl: false
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.13 ms
Input props
[
  "user" => App\Entity\User {#4178
    +avatar: null
    +cover: null
    +email: "somethingsomethingidk@lemmy.world"
    +username: "@somethingsomethingidk@lemmy.world"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729129826 {#4200
      date: 2024-10-17 03:50:26.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
    +entries: Doctrine\ORM\PersistentCollection {#4171 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
    +posts: Doctrine\ORM\PersistentCollection {#4231 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
    +follows: Doctrine\ORM\PersistentCollection {#4243 …}
    +followers: Doctrine\ORM\PersistentCollection {#4245 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
    +reports: Doctrine\ORM\PersistentCollection {#4255 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
    +violations: Doctrine\ORM\PersistentCollection {#4259 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
    +awards: Doctrine\ORM\PersistentCollection {#4263 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
    +categories: Doctrine\ORM\PersistentCollection {#4267 …}
    -id: 82689
    -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
    +apId: "somethingsomethingidk@lemmy.world"
    +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
    +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "somethingsomethingidk"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1727074285 {#4197
      date: 2024-09-23 08:51:25.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1702742938 {#4190
      date: 2023-12-16 17:08:58.0 +01:00
    }
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#5781
  +user: App\Entity\User {#4178
    +avatar: null
    +cover: null
    +email: "somethingsomethingidk@lemmy.world"
    +username: "@somethingsomethingidk@lemmy.world"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729129826 {#4200
      date: 2024-10-17 03:50:26.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
    +entries: Doctrine\ORM\PersistentCollection {#4171 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
    +posts: Doctrine\ORM\PersistentCollection {#4231 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
    +follows: Doctrine\ORM\PersistentCollection {#4243 …}
    +followers: Doctrine\ORM\PersistentCollection {#4245 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
    +reports: Doctrine\ORM\PersistentCollection {#4255 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
    +violations: Doctrine\ORM\PersistentCollection {#4259 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
    +awards: Doctrine\ORM\PersistentCollection {#4263 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
    +categories: Doctrine\ORM\PersistentCollection {#4267 …}
    -id: 82689
    -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
    +apId: "somethingsomethingidk@lemmy.world"
    +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
    +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "somethingsomethingidk"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1727074285 {#4197
      date: 2024-09-23 08:51:25.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1702742938 {#4190
      date: 2023-12-16 17:08:58.0 +01:00
    }
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.15 ms
Input props
[
  "date" => DateTimeImmutable @1706443234 {#4199
    date: 2024-01-28 13:00:34.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#5836
  +date: DateTimeImmutable @1706443234 {#4199
    date: 2024-01-28 13:00:34.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.09 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706443234 {#4199
    date: 2024-01-28 13:00:34.0 +01:00
  }
  "editedAt" => null
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#5890
  +createdAt: DateTimeImmutable @1706443234 {#4199
    date: 2024-01-28 13:00:34.0 +01:00
  }
  +editedAt: null
}
user_avatar App\Twig\Components\UserAvatarComponent 12.0 MiB 0.14 ms
Input props
[
  "user" => App\Entity\User {#4178
    +avatar: null
    +cover: null
    +email: "somethingsomethingidk@lemmy.world"
    +username: "@somethingsomethingidk@lemmy.world"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729129826 {#4200
      date: 2024-10-17 03:50:26.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
    +entries: Doctrine\ORM\PersistentCollection {#4171 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
    +posts: Doctrine\ORM\PersistentCollection {#4231 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
    +follows: Doctrine\ORM\PersistentCollection {#4243 …}
    +followers: Doctrine\ORM\PersistentCollection {#4245 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
    +reports: Doctrine\ORM\PersistentCollection {#4255 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
    +violations: Doctrine\ORM\PersistentCollection {#4259 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
    +awards: Doctrine\ORM\PersistentCollection {#4263 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
    +categories: Doctrine\ORM\PersistentCollection {#4267 …}
    -id: 82689
    -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
    +apId: "somethingsomethingidk@lemmy.world"
    +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
    +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "somethingsomethingidk"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1727074285 {#4197
      date: 2024-09-23 08:51:25.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1702742938 {#4190
      date: 2023-12-16 17:08:58.0 +01:00
    }
  }
  "width" => 40
  "height" => 40
  "asLink" => true
]
Attributes
[]
Component
App\Twig\Components\UserAvatarComponent {#5944
  +width: 40
  +height: 40
  +user: App\Entity\User {#4178
    +avatar: null
    +cover: null
    +email: "somethingsomethingidk@lemmy.world"
    +username: "@somethingsomethingidk@lemmy.world"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729129826 {#4200
      date: 2024-10-17 03:50:26.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
    +entries: Doctrine\ORM\PersistentCollection {#4171 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
    +posts: Doctrine\ORM\PersistentCollection {#4231 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
    +follows: Doctrine\ORM\PersistentCollection {#4243 …}
    +followers: Doctrine\ORM\PersistentCollection {#4245 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
    +reports: Doctrine\ORM\PersistentCollection {#4255 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
    +violations: Doctrine\ORM\PersistentCollection {#4259 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
    +awards: Doctrine\ORM\PersistentCollection {#4263 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
    +categories: Doctrine\ORM\PersistentCollection {#4267 …}
    -id: 82689
    -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
    +apId: "somethingsomethingidk@lemmy.world"
    +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
    +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "somethingsomethingidk"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1727074285 {#4197
      date: 2024-09-23 08:51:25.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1702742938 {#4190
      date: 2023-12-16 17:08:58.0 +01:00
    }
  }
  +asLink: true
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.34 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#6013
  +subject: App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  +formDest: "entry_comment"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 0.64 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#6070
  +formDest: "entry_comment"
  +subject: App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entry_comments_nested App\Twig\Components\EntryCommentsNestedComponent 12.0 MiB 29.80 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  "level" => 1
  "showNested" => true
  "view" => "tree"
]
Attributes
[
  "showNested" => true
]
Component
App\Twig\Components\EntryCommentsNestedComponent {#6310
  +comment: App\Entity\EntryComment {#4195
    +user: App\Entity\User {#4178
      +avatar: null
      +cover: null
      +email: "somethingsomethingidk@lemmy.world"
      +username: "@somethingsomethingidk@lemmy.world"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729129826 {#4200
        date: 2024-10-17 03:50:26.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4177 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4175 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4173 …}
      +entries: Doctrine\ORM\PersistentCollection {#4171 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4169 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4228 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4229 …}
      +posts: Doctrine\ORM\PersistentCollection {#4231 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4233 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4235 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4237 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4239 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4241 …}
      +follows: Doctrine\ORM\PersistentCollection {#4243 …}
      +followers: Doctrine\ORM\PersistentCollection {#4245 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4247 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4249 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4251 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4253 …}
      +reports: Doctrine\ORM\PersistentCollection {#4255 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4257 …}
      +violations: Doctrine\ORM\PersistentCollection {#4259 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4261 …}
      +awards: Doctrine\ORM\PersistentCollection {#4263 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4265 …}
      +categories: Doctrine\ORM\PersistentCollection {#4267 …}
      -id: 82689
      -password: "$2y$13$10EOb23guscOyksRxXp04.TSeVR.xys3NKaSrLwkvQWFkVPGs8PZO"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4269 …}
      +apId: "somethingsomethingidk@lemmy.world"
      +apProfileId: "https://lemmy.world/u/somethingsomethingidk"
      +apPublicUrl: "https://lemmy.world/u/somethingsomethingidk"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "somethingsomethingidk"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1727074285 {#4197
        date: 2024-09-23 08:51:25.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1702742938 {#4190
        date: 2023-12-16 17:08:58.0 +01:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: "I have an array based solution but it doesn’t solve the cases of changing the order or empty fields."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1706443234 {#4201
      date: 2024-01-28 13:00:34.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4193 …}
    +nested: Doctrine\ORM\PersistentCollection {#4191 …}
    +votes: Doctrine\ORM\PersistentCollection {#4189 …}
    +reports: Doctrine\ORM\PersistentCollection {#4186 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4182 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4180 …}
    -id: 346873
    -bodyTs: "'array':4 'base':5 'case':13 'chang':15 'doesn':9 'empti':19 'field':20 'order':17 'solut':6 'solv':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/7100507"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706443234 {#4199
      date: 2024-01-28 13:00:34.0 +01:00
    }
  }
  +nestedComments: []
  +level: 1
  +view: "tree"
  -entryCommentRepository: App\Repository\EntryCommentRepository {#556 …}
  -twig: Twig\Environment {#1252 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
entry_comment App\Twig\Components\EntryCommentComponent 12.0 MiB 42.70 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  "showNested" => true
  "dateAsUrl" => false
  "showMagazineName" => false
  "showEntryTitle" => false
]
Attributes
[]
Component
App\Twig\Components\EntryCommentComponent {#6380
  +comment: App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  +showMagazineName: false
  +showEntryTitle: false
  +showNested: true
  +level: 1
  +canSeeTrash: false
  +dateAsUrl: false
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.13 ms
Input props
[
  "user" => App\Entity\User {#4289
    +avatar: null
    +cover: null
    +email: "Flyswat@lemmy.dbzer0.com"
    +username: "@Flyswat@lemmy.dbzer0.com"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729120937 {#4273
      date: 2024-10-17 01:22:17.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
    +entries: Doctrine\ORM\PersistentCollection {#4296 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
    +posts: Doctrine\ORM\PersistentCollection {#4304 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
    +follows: Doctrine\ORM\PersistentCollection {#4316 …}
    +followers: Doctrine\ORM\PersistentCollection {#4318 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
    +reports: Doctrine\ORM\PersistentCollection {#4328 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
    +violations: Doctrine\ORM\PersistentCollection {#4332 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
    +awards: Doctrine\ORM\PersistentCollection {#4336 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
    +categories: Doctrine\ORM\PersistentCollection {#4340 …}
    -id: 46103
    -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
    +apId: "Flyswat@lemmy.dbzer0.com"
    +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
    +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
    +apDomain: "lemmy.dbzer0.com"
    +apPreferredUsername: "Flyswat"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1719729962 {#4274
      date: 2024-06-30 08:46:02.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1694678470 {#4275
      date: 2023-09-14 10:01:10.0 +02:00
    }
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#6425
  +user: App\Entity\User {#4289
    +avatar: null
    +cover: null
    +email: "Flyswat@lemmy.dbzer0.com"
    +username: "@Flyswat@lemmy.dbzer0.com"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729120937 {#4273
      date: 2024-10-17 01:22:17.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
    +entries: Doctrine\ORM\PersistentCollection {#4296 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
    +posts: Doctrine\ORM\PersistentCollection {#4304 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
    +follows: Doctrine\ORM\PersistentCollection {#4316 …}
    +followers: Doctrine\ORM\PersistentCollection {#4318 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
    +reports: Doctrine\ORM\PersistentCollection {#4328 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
    +violations: Doctrine\ORM\PersistentCollection {#4332 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
    +awards: Doctrine\ORM\PersistentCollection {#4336 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
    +categories: Doctrine\ORM\PersistentCollection {#4340 …}
    -id: 46103
    -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
    +apId: "Flyswat@lemmy.dbzer0.com"
    +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
    +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
    +apDomain: "lemmy.dbzer0.com"
    +apPreferredUsername: "Flyswat"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1719729962 {#4274
      date: 2024-06-30 08:46:02.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1694678470 {#4275
      date: 2023-09-14 10:01:10.0 +02:00
    }
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.13 ms
Input props
[
  "date" => DateTimeImmutable @1706437319 {#4272
    date: 2024-01-28 11:21:59.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#6480
  +date: DateTimeImmutable @1706437319 {#4272
    date: 2024-01-28 11:21:59.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.09 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706437319 {#4272
    date: 2024-01-28 11:21:59.0 +01:00
  }
  "editedAt" => null
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#6534
  +createdAt: DateTimeImmutable @1706437319 {#4272
    date: 2024-01-28 11:21:59.0 +01:00
  }
  +editedAt: null
}
user_avatar App\Twig\Components\UserAvatarComponent 12.0 MiB 2.51 ms
Input props
[
  "user" => App\Entity\User {#4289
    +avatar: null
    +cover: null
    +email: "Flyswat@lemmy.dbzer0.com"
    +username: "@Flyswat@lemmy.dbzer0.com"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729120937 {#4273
      date: 2024-10-17 01:22:17.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
    +entries: Doctrine\ORM\PersistentCollection {#4296 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
    +posts: Doctrine\ORM\PersistentCollection {#4304 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
    +follows: Doctrine\ORM\PersistentCollection {#4316 …}
    +followers: Doctrine\ORM\PersistentCollection {#4318 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
    +reports: Doctrine\ORM\PersistentCollection {#4328 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
    +violations: Doctrine\ORM\PersistentCollection {#4332 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
    +awards: Doctrine\ORM\PersistentCollection {#4336 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
    +categories: Doctrine\ORM\PersistentCollection {#4340 …}
    -id: 46103
    -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
    +apId: "Flyswat@lemmy.dbzer0.com"
    +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
    +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
    +apDomain: "lemmy.dbzer0.com"
    +apPreferredUsername: "Flyswat"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1719729962 {#4274
      date: 2024-06-30 08:46:02.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1694678470 {#4275
      date: 2023-09-14 10:01:10.0 +02:00
    }
  }
  "width" => 40
  "height" => 40
  "asLink" => true
]
Attributes
[]
Component
App\Twig\Components\UserAvatarComponent {#6588
  +width: 40
  +height: 40
  +user: App\Entity\User {#4289
    +avatar: null
    +cover: null
    +email: "Flyswat@lemmy.dbzer0.com"
    +username: "@Flyswat@lemmy.dbzer0.com"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729120937 {#4273
      date: 2024-10-17 01:22:17.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
    +entries: Doctrine\ORM\PersistentCollection {#4296 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
    +posts: Doctrine\ORM\PersistentCollection {#4304 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
    +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
    +follows: Doctrine\ORM\PersistentCollection {#4316 …}
    +followers: Doctrine\ORM\PersistentCollection {#4318 …}
    +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
    +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
    +reports: Doctrine\ORM\PersistentCollection {#4328 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
    +violations: Doctrine\ORM\PersistentCollection {#4332 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
    +awards: Doctrine\ORM\PersistentCollection {#4336 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
    +categories: Doctrine\ORM\PersistentCollection {#4340 …}
    -id: 46103
    -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
    +apId: "Flyswat@lemmy.dbzer0.com"
    +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
    +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
    +apFollowersUrl: null
    +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
    +apDomain: "lemmy.dbzer0.com"
    +apPreferredUsername: "Flyswat"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1719729962 {#4274
      date: 2024-06-30 08:46:02.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1694678470 {#4275
      date: 2023-09-14 10:01:10.0 +02:00
    }
  }
  +asLink: true
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.34 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#6669
  +subject: App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  +formDest: "entry_comment"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 0.63 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#6726
  +formDest: "entry_comment"
  +subject: App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entry_comments_nested App\Twig\Components\EntryCommentsNestedComponent 12.0 MiB 34.03 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  "level" => 1
  "showNested" => true
  "view" => "tree"
]
Attributes
[
  "showNested" => true
]
Component
App\Twig\Components\EntryCommentsNestedComponent {#6966
  +comment: App\Entity\EntryComment {#4276
    +user: App\Entity\User {#4289
      +avatar: null
      +cover: null
      +email: "Flyswat@lemmy.dbzer0.com"
      +username: "@Flyswat@lemmy.dbzer0.com"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729120937 {#4273
        date: 2024-10-17 01:22:17.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
      +entries: Doctrine\ORM\PersistentCollection {#4296 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
      +posts: Doctrine\ORM\PersistentCollection {#4304 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
      +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
      +follows: Doctrine\ORM\PersistentCollection {#4316 …}
      +followers: Doctrine\ORM\PersistentCollection {#4318 …}
      +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
      +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
      +reports: Doctrine\ORM\PersistentCollection {#4328 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
      +violations: Doctrine\ORM\PersistentCollection {#4332 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
      +awards: Doctrine\ORM\PersistentCollection {#4336 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
      +categories: Doctrine\ORM\PersistentCollection {#4340 …}
      -id: 46103
      -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
      +apId: "Flyswat@lemmy.dbzer0.com"
      +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
      +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
      +apFollowersUrl: null
      +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
      +apDomain: "lemmy.dbzer0.com"
      +apPreferredUsername: "Flyswat"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1719729962 {#4274
        date: 2024-06-30 08:46:02.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1694678470 {#4275
        date: 2023-09-14 10:01:10.0 +02:00
      }
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978
        +avatar: null
        +cover: null
        +email: "linuxPIPEpower@discuss.tchncs.de"
        +username: "@linuxPIPEpower@discuss.tchncs.de"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729147158 {#1515
          date: 2024-10-17 08:39:18.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
        +entries: Doctrine\ORM\PersistentCollection {#1406 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
        +posts: Doctrine\ORM\PersistentCollection {#1745 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
        +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
        +follows: Doctrine\ORM\PersistentCollection {#1409 …}
        +followers: Doctrine\ORM\PersistentCollection {#1624 …}
        +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
        +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
        +reports: Doctrine\ORM\PersistentCollection {#1416 …}
        +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
        +violations: Doctrine\ORM\PersistentCollection {#1694 …}
        +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
        +awards: Doctrine\ORM\PersistentCollection {#1434 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
        +categories: Doctrine\ORM\PersistentCollection {#1640 …}
        -id: 86105
        -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
        +apId: "linuxPIPEpower@discuss.tchncs.de"
        +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
        +apFollowersUrl: null
        +apInboxUrl: "https://discuss.tchncs.de/inbox"
        +apDomain: "discuss.tchncs.de"
        +apPreferredUsername: "linuxPIPEpower"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1728132845 {#1516
          date: 2024-10-05 14:54:05.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1705651727 {#1518
          date: 2024-01-19 09:08:47.0 +01:00
        }
        +__isInitialized__: true
         …2
      }
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: null
    +root: null
    +body: """
      > If you fill both fields the output in the terminal is `file|this is some text|`\n
      \n
      Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1729128706 {#4271
      date: 2024-10-17 03:31:46.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4277 …}
    +nested: Doctrine\ORM\PersistentCollection {#4279 …}
    +votes: Doctrine\ORM\PersistentCollection {#4281 …}
    +reports: Doctrine\ORM\PersistentCollection {#4283 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
    -id: 346800
    -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/7219040"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706437319 {#4272
      date: 2024-01-28 11:21:59.0 +01:00
    }
  }
  +nestedComments: [
    346865 => App\Entity\EntryComment {#4360
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: App\Entity\EntryComment {#4276}
      +root: App\Entity\EntryComment {#4276}
      +body: """
        It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
        \n
        This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1706442463 {#4361
        date: 2024-01-28 12:47:43.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
        "@Flyswat@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4357 …}
      +nested: Doctrine\ORM\PersistentCollection {#4353 …}
      +votes: Doctrine\ORM\PersistentCollection {#4351 …}
      +reports: Doctrine\ORM\PersistentCollection {#4366 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
      -id: 346865
      -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/comment/6918125"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706442463 {#4364
        date: 2024-01-28 12:47:43.0 +01:00
      }
    }
  ]
  +level: 1
  +view: "tree"
  -entryCommentRepository: App\Repository\EntryCommentRepository {#556 …}
  -twig: Twig\Environment {#1252 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
entry_comment App\Twig\Components\EntryCommentComponent 12.0 MiB 10.13 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  "showNested" => true
  "level" => 2
  "showEntryTitle" => false
  "showMagazineName" => false
]
Attributes
[]
Component
App\Twig\Components\EntryCommentComponent {#7026
  +comment: App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  +showMagazineName: false
  +showEntryTitle: false
  +showNested: true
  +level: 2
  +canSeeTrash: false
  +dateAsUrl: false
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -authorizationChecker: Symfony\Component\Security\Core\Authorization\AuthorizationChecker {#931 …}
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.15 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  "showAvatar" => false
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#7071
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +showAvatar: false
}
date App\Twig\Components\DateComponent 12.0 MiB 0.15 ms
Input props
[
  "date" => DateTimeImmutable @1706442463 {#4364
    date: 2024-01-28 12:47:43.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#7126
  +date: DateTimeImmutable @1706442463 {#4364
    date: 2024-01-28 12:47:43.0 +01:00
  }
}
date_edited App\Twig\Components\DateEditedComponent 12.0 MiB 0.09 ms
Input props
[
  "createdAt" => DateTimeImmutable @1706442463 {#4364
    date: 2024-01-28 12:47:43.0 +01:00
  }
  "editedAt" => null
]
Attributes
[]
Component
App\Twig\Components\DateEditedComponent {#7180
  +createdAt: DateTimeImmutable @1706442463 {#4364
    date: 2024-01-28 12:47:43.0 +01:00
  }
  +editedAt: null
}
user_avatar App\Twig\Components\UserAvatarComponent 12.0 MiB 0.13 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  "width" => 40
  "height" => 40
  "asLink" => true
]
Attributes
[]
Component
App\Twig\Components\UserAvatarComponent {#7234
  +width: 40
  +height: 40
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +asLink: true
}
vote App\Twig\Components\VoteComponent 12.0 MiB 0.40 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\VoteComponent {#7307
  +subject: App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  +formDest: "entry_comment"
  +showDownvote: true
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
boost App\Twig\Components\BoostComponent 12.0 MiB 0.66 ms
Input props
[
  "subject" => App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\BoostComponent {#7364
  +formDest: "entry_comment"
  +subject: App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
}
entry_comments_nested App\Twig\Components\EntryCommentsNestedComponent 12.0 MiB 0.51 ms
Input props
[
  "comment" => App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  "level" => 2
  "showNested" => true
  "view" => "tree"
]
Attributes
[
  "showNested" => true
]
Component
App\Twig\Components\EntryCommentsNestedComponent {#3107
  +comment: App\Entity\EntryComment {#4360
    +user: Proxies\__CG__\App\Entity\User {#1978
      +avatar: null
      +cover: null
      +email: "linuxPIPEpower@discuss.tchncs.de"
      +username: "@linuxPIPEpower@discuss.tchncs.de"
      +roles: []
      +followersCount: 0
      +homepage: "front"
      +about: null
      +lastActive: DateTime @1729147158 {#1515
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +markedForDeletionAt: null
      +fields: null
      +oauthGithubId: null
      +oauthGoogleId: null
      +oauthFacebookId: null
      +oauthKeycloakId: null
      +hideAdult: true
      +showSubscribedUsers: true
      +showSubscribedMagazines: true
      +showSubscribedDomains: true
      +preferredLanguages: []
      +featuredMagazines: null
      +showProfileSubscriptions: false
      +showProfileFollowings: true
      +markNewComments: false
      +notifyOnNewEntry: false
      +notifyOnNewEntryReply: true
      +notifyOnNewEntryCommentReply: true
      +notifyOnNewPost: false
      +notifyOnNewPostReply: true
      +notifyOnNewPostCommentReply: true
      +addMentionsEntries: false
      +addMentionsPosts: true
      +isBanned: false
      +isVerified: false
      +isDeleted: false
      +isBot: false
      +spamProtection: true
      +customCss: null
      +ignoreMagazinesCustomCss: false
      +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
      +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
      +entries: Doctrine\ORM\PersistentCollection {#1406 …}
      +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
      +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
      +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
      +posts: Doctrine\ORM\PersistentCollection {#1745 …}
      +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
      +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
      +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
      +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
      +follows: Doctrine\ORM\PersistentCollection {#1409 …}
      +followers: Doctrine\ORM\PersistentCollection {#1624 …}
      +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
      +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
      +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
      +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
      +reports: Doctrine\ORM\PersistentCollection {#1416 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
      +violations: Doctrine\ORM\PersistentCollection {#1694 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
      +awards: Doctrine\ORM\PersistentCollection {#1434 …}
      +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
      +categories: Doctrine\ORM\PersistentCollection {#1640 …}
      -id: 86105
      -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
      -totpSecret: null
      -totpBackupCodes: []
      -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
      +apId: "linuxPIPEpower@discuss.tchncs.de"
      +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
      +apFollowersUrl: null
      +apInboxUrl: "https://discuss.tchncs.de/inbox"
      +apDomain: "discuss.tchncs.de"
      +apPreferredUsername: "linuxPIPEpower"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: false
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1728132845 {#1516
        date: 2024-10-05 14:54:05.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1705651727 {#1518
        date: 2024-01-19 09:08:47.0 +01:00
      }
      +__isInitialized__: true
       …2
    }
    +entry: App\Entity\Entry {#2400
      +user: Proxies\__CG__\App\Entity\User {#1978 …2}
      +magazine: App\Entity\Magazine {#265
        +icon: Proxies\__CG__\App\Entity\Image {#246 …}
        +name: "linux@lemmy.ml"
        +title: "linux"
        +description: """
          From Wikipedia, the free encyclopedia\n
          \n
          Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
          \n
          Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
          \n
          ### Rules\n
          \n
          - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
          - No misinformation\n
          - No NSFW content\n
          - No hate speech, bigotry, etc\n
          \n
          ### Related Communities\n
          \n
          - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
          - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
          - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
          - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
          \n
          Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
          """
        +rules: null
        +subscriptionsCount: 1
        +entryCount: 1406
        +entryCommentCount: 28632
        +postCount: 6
        +postCommentCount: 214
        +isAdult: false
        +customCss: null
        +lastActive: DateTime @1729583542 {#275
          date: 2024-10-22 09:52:22.0 +02:00
        }
        +markedForDeletionAt: null
        +tags: null
        +moderators: Doctrine\ORM\PersistentCollection {#237 …}
        +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
        +entries: Doctrine\ORM\PersistentCollection {#180 …}
        +posts: Doctrine\ORM\PersistentCollection {#138 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
        +bans: Doctrine\ORM\PersistentCollection {#117 …}
        +reports: Doctrine\ORM\PersistentCollection {#103 …}
        +badges: Doctrine\ORM\PersistentCollection {#81 …}
        +logs: Doctrine\ORM\PersistentCollection {#71 …}
        +awards: Doctrine\ORM\PersistentCollection {#1346 …}
        +categories: Doctrine\ORM\PersistentCollection {#1823 …}
        -id: 73
        +apId: "linux@lemmy.ml"
        +apProfileId: "https://lemmy.ml/c/linux"
        +apPublicUrl: "https://lemmy.ml/c/linux"
        +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
        +apInboxUrl: "https://lemmy.ml/inbox"
        +apDomain: "lemmy.ml"
        +apPreferredUsername: "linux"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: null
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1729583596 {#269
          date: 2024-10-22 09:53:16.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1698929468 {#271
          date: 2023-11-02 13:51:08.0 +01:00
        }
      }
      +image: null
      +domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
      +slug: "Use-YAD-Zenity-dialogues-to-populated-variables-in-a-bash-script"
      +title: "Use YAD/Zenity dialogues to populated variables in a bash script?"
      +url: null
      +body: """
        I am learning some bash scripting.\n
        \n
        I am interested to learn about getting input for my scripts via a GUI interface. It seems that `yad` (forked from `zenity`) is the most robust tool for this. (But if there is a better choice I would like to hear about it too.)\n
        \n
        Is it possible to obtain *2 or more* named variables using `yad`? *Not* just getting the values based on their positions (`$1`, `$2`, etc), with `awk`. See “What doesn’t work” spoiler for those.\n
        \n
        What doesn't workI find how to obtain *one* named variable, for [example](https://askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity): `sh inputStr=$(zenity --entry --title=“My Title” --text=“My Text:”) `I also find solutions relying on opening single-variable dialogues sequentially but that’s a terrible interface. Everything else relies on chopping up the output with `awk` or based on the positions, `$1`, `$2`, `$3` etc. In [this script](https://askubuntu.com/a/1251429) `$jpgfile` is obtained: `sh jpgfile=$(echo $OUTPUT | awk ‘BEGIN {FS=“,” } { print $1 }’) `This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.\n
        \n
        For a simple example, I want to ask the user for a file name and some content. Creating the dialogue is like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">yad --title </span><span style="color:#183691;">"Create a file"</span><span style="color:#323232;"> --form --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"File name"</span><span style="color:#323232;"> --field</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"Content"\n
        </span>\n
        ```\n
        \n
        If you fill both fields the output in the terminal is `file|this is some text|`. How do I get them into variables like `$filename` and `$filecontent`? So then I can finish the script like this:\n
        \n
        ```\n
        \n
        <span style="color:#323232;">touch </span><span style="color:#183691;">"$</span><span style="color:#323232;">filename</span><span style="color:#183691;">"\n
        </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"$</span><span style="color:#323232;">filecontent</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">$filename\n
        </span>\n
        ```\n
        \n
        Is this possible??? I do not find it anywhere. I looked though all kinds of websites like [YAD Guide](https://yad-guide.ingk.se/), [yad man page](https://www.mankier.com/1/yad), [smokey01](https://smokey01.com/yad/). Maybe I missed something. On [yaddemo](https://github.com/cjungmann/yaddemo/) I read about bash arrays and it seemed to come close but I couldn’t quite piece it together.
        """
      +type: "article"
      +lang: "en"
      +isOc: false
      +hasEmbed: false
      +commentCount: 5
      +favouriteCount: 9
      +score: 0
      +isAdult: false
      +sticky: false
      +lastActive: DateTime @1729147158 {#2414
        date: 2024-10-17 08:39:18.0 +02:00
      }
      +ip: null
      +adaAmount: 0
      +tags: null
      +mentions: null
      +comments: Doctrine\ORM\PersistentCollection {#1688 …}
      +votes: Doctrine\ORM\PersistentCollection {#1966 …}
      +reports: Doctrine\ORM\PersistentCollection {#1965 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1368 …}
      +notifications: Doctrine\ORM\PersistentCollection {#2426 …}
      +badges: Doctrine\ORM\PersistentCollection {#2439 …}
      +children: []
      -id: 33597
      -titleTs: "'bash':9 'dialogu':3 'popul':5 'script':10 'use':1 'variabl':6 'yad/zenity':2"
      -bodyTs: "'/),':293 '/1/yad),':299 '/a/1251429)':153 '/cjungmann/yaddemo/)':312 '/questions/489497/store-the-return-string-to-a-variable-from-zenity):':100 '/yad/).':303 '1':72,144,165 '2':56,73,145 '3':146 'ad':170 'also':112 'anywher':280 'array':317 'ask':204 'askubuntu.com':99,152 'askubuntu.com/a/1251429)':151 'askubuntu.com/questions/489497/store-the-return-string-to-a-variable-from-zenity):':98 'awk':76,138,161 'base':68,140 'bash':5,316 'begin':162 'better':41 'chang':184 'choic':42 'chop':133 'close':323 'come':322 'content':213,230 'couldn':326 'creat':214,222 'dialogu':121,216 'doesn':79,86 'echo':159,269 'els':130 'entri':104 'etc':74,147 'everi':189 'everyth':129 'exampl':97,200 'fail':175 'field':173,181,226,229,235 'file':209,224,227,242 'filecont':257,270 'filenam':255,268,271 'fill':233 'find':89,113,278 'finish':262 'fork':26 'form':225 'fragil':196 'fs':163 'get':13,65,250 'github.com':311 'github.com/cjungmann/yaddemo/)':310 'gui':20 'guid':290 'hear':47 'input':14,178 'inputstr':102 'interest':9 'interfac':21,128 'jpgfile':154,158 'kind':285 'learn':3,11 'like':45,218,254,265,288 'look':282 'man':295 'mayb':304 'miss':306 'name':59,94,210,228 'new':172 'obtain':55,92,156 'one':93 'open':117 'order':187 'output':136,160,186,237 'page':296 'piec':329 'posit':71,143 'possibl':53,274 'print':164 'provid':177 'quit':328 'read':314 'reli':115,131 'robust':32 'script':6,17,150,264 'see':77 'seem':23,167,320 'sequenti':122 'sh':101,157 'simpl':199 'singl':119 'single-vari':118 'smokey01':300 'smokey01.com':302 'smokey01.com/yad/).':301 'solut':114 'someth':307 'spoiler':82 'subsequ':190 'termin':240 'terribl':127 'text':108,110,246 'though':283 'titl':105,107,221 'togeth':331 'tool':33 'touch':267 'unmanag':168 'use':61 'user':206 'valu':67,191 'variabl':60,95,120,253 'via':18 'want':202 'way':194 'websit':287 'work':81 'worki':88 'would':44 'www.mankier.com':298 'www.mankier.com/1/yad),':297 'yad':25,62,220,289,294 'yad-guide.ingk.se':292 'yad-guide.ingk.se/),':291 'yaddemo':309 'zeniti':28,103"
      +cross: false
      +upVotes: 0
      +downVotes: 0
      +ranking: 1706482025
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/post/9987356"
      +editedAt: DateTimeImmutable @1729128865 {#1793
        date: 2024-10-17 03:34:25.0 +02:00
      }
      +createdAt: DateTimeImmutable @1706436525 {#2402
        date: 2024-01-28 11:08:45.0 +01:00
      }
    }
    +magazine: App\Entity\Magazine {#265}
    +image: null
    +parent: App\Entity\EntryComment {#4276
      +user: App\Entity\User {#4289
        +avatar: null
        +cover: null
        +email: "Flyswat@lemmy.dbzer0.com"
        +username: "@Flyswat@lemmy.dbzer0.com"
        +roles: []
        +followersCount: 0
        +homepage: "front"
        +about: null
        +lastActive: DateTime @1729120937 {#4273
          date: 2024-10-17 01:22:17.0 +02:00
        }
        +markedForDeletionAt: null
        +fields: null
        +oauthGithubId: null
        +oauthGoogleId: null
        +oauthFacebookId: null
        +oauthKeycloakId: null
        +hideAdult: true
        +showSubscribedUsers: true
        +showSubscribedMagazines: true
        +showSubscribedDomains: true
        +preferredLanguages: []
        +featuredMagazines: null
        +showProfileSubscriptions: false
        +showProfileFollowings: true
        +markNewComments: false
        +notifyOnNewEntry: false
        +notifyOnNewEntryReply: true
        +notifyOnNewEntryCommentReply: true
        +notifyOnNewPost: false
        +notifyOnNewPostReply: true
        +notifyOnNewPostCommentReply: true
        +addMentionsEntries: false
        +addMentionsPosts: true
        +isBanned: false
        +isVerified: false
        +isDeleted: false
        +isBot: false
        +spamProtection: true
        +customCss: null
        +ignoreMagazinesCustomCss: false
        +moderatorTokens: Doctrine\ORM\PersistentCollection {#4290 …}
        +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#4292 …}
        +moderatorRequests: Doctrine\ORM\PersistentCollection {#4294 …}
        +entries: Doctrine\ORM\PersistentCollection {#4296 …}
        +entryVotes: Doctrine\ORM\PersistentCollection {#4298 …}
        +entryComments: Doctrine\ORM\PersistentCollection {#4300 …}
        +entryCommentVotes: Doctrine\ORM\PersistentCollection {#4302 …}
        +posts: Doctrine\ORM\PersistentCollection {#4304 …}
        +postVotes: Doctrine\ORM\PersistentCollection {#4306 …}
        +postComments: Doctrine\ORM\PersistentCollection {#4308 …}
        +postCommentVotes: Doctrine\ORM\PersistentCollection {#4310 …}
        +subscriptions: Doctrine\ORM\PersistentCollection {#4312 …}
        +subscribedDomains: Doctrine\ORM\PersistentCollection {#4314 …}
        +follows: Doctrine\ORM\PersistentCollection {#4316 …}
        +followers: Doctrine\ORM\PersistentCollection {#4318 …}
        +blocks: Doctrine\ORM\PersistentCollection {#4320 …}
        +blockers: Doctrine\ORM\PersistentCollection {#4322 …}
        +blockedMagazines: Doctrine\ORM\PersistentCollection {#4324 …}
        +blockedDomains: Doctrine\ORM\PersistentCollection {#4326 …}
        +reports: Doctrine\ORM\PersistentCollection {#4328 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4330 …}
        +violations: Doctrine\ORM\PersistentCollection {#4332 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4334 …}
        +awards: Doctrine\ORM\PersistentCollection {#4336 …}
        +subscribedCategories: Doctrine\ORM\PersistentCollection {#4338 …}
        +categories: Doctrine\ORM\PersistentCollection {#4340 …}
        -id: 46103
        -password: "$2y$13$eEDaMYATOH9OYSFb25eAgeF98Ba6r291U2WWWYerDnpU5jkt4GbFi"
        -totpSecret: null
        -totpBackupCodes: []
        -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#4342 …}
        +apId: "Flyswat@lemmy.dbzer0.com"
        +apProfileId: "https://lemmy.dbzer0.com/u/Flyswat"
        +apPublicUrl: "https://lemmy.dbzer0.com/u/Flyswat"
        +apFollowersUrl: null
        +apInboxUrl: "https://lemmy.dbzer0.com/inbox"
        +apDomain: "lemmy.dbzer0.com"
        +apPreferredUsername: "Flyswat"
        +apDiscoverable: true
        +apManuallyApprovesFollowers: false
        +privateKey: null
        +publicKey: null
        +apFetchedAt: DateTime @1719729962 {#4274
          date: 2024-06-30 08:46:02.0 +02:00
        }
        +apDeletedAt: null
        +apTimeoutAt: null
        +visibility: "visible             "
        +createdAt: DateTimeImmutable @1694678470 {#4275
          date: 2023-09-14 10:01:10.0 +02:00
        }
      }
      +entry: App\Entity\Entry {#2400}
      +magazine: App\Entity\Magazine {#265}
      +image: null
      +parent: null
      +root: null
      +body: """
        > If you fill both fields the output in the terminal is `file|this is some text|`\n
        \n
        Wouldn’t it be easy to get them using awk by defining `|` as a field separator?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1729128706 {#4271
        date: 2024-10-17 03:31:46.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@linuxPIPEpower@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4277 …}
      +nested: Doctrine\ORM\PersistentCollection {#4279 …}
      +votes: Doctrine\ORM\PersistentCollection {#4281 …}
      +reports: Doctrine\ORM\PersistentCollection {#4283 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4285 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4287 …}
      -id: 346800
      -bodyTs: "'awk':26 'defin':28 'easi':21 'field':5,31 'file':12 'fill':3 'get':23 'output':7 'separ':32 'termin':10 'text':16 'use':25 'wouldn':17"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/7219040"
      +editedAt: null
      +createdAt: DateTimeImmutable @1706437319 {#4272
        date: 2024-01-28 11:21:59.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4276}
    +body: """
      It is the only solution I found. I described it in the post but put it behind a “spoiler” “What doesn’t work” to make the post shorter.\n
      \n
      This seems unmanageable because adding a new field or failing to provide input for a field will both change the output order of every subsequent value. It’s way too fragile.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1706442463 {#4361
      date: 2024-01-28 12:47:43.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@linuxPIPEpower@discuss.tchncs.de"
      "@Flyswat@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4357 …}
    +nested: Doctrine\ORM\PersistentCollection {#4353 …}
    +votes: Doctrine\ORM\PersistentCollection {#4351 …}
    +reports: Doctrine\ORM\PersistentCollection {#4366 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4368 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4370 …}
    -id: 346865
    -bodyTs: "'ad':33 'behind':17 'chang':47 'describ':9 'doesn':21 'everi':52 'fail':38 'field':36,44 'found':7 'fragil':59 'input':41 'make':25 'new':35 'order':50 'output':49 'post':13,27 'provid':40 'put':15 'seem':30 'shorter':28 'solut':5 'spoiler':19 'subsequ':53 'unmanag':31 'valu':54 'way':57 'work':23"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6918125"
    +editedAt: null
    +createdAt: DateTimeImmutable @1706442463 {#4364
      date: 2024-01-28 12:47:43.0 +01:00
    }
  }
  +nestedComments: []
  +level: 2
  +view: "tree"
  -entryCommentRepository: App\Repository\EntryCommentRepository {#556 …}
  -twig: Twig\Environment {#1252 …}
  -security: Symfony\Bundle\SecurityBundle\Security {#1101 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
settings_row_enum App\Twig\Components\SettingsRowEnumComponent 12.0 MiB 0.23 ms
Input props
[
  "label" => "Sidebar position"
  "settingsKey" => "KBIN_GENERAL_SIDEBAR_POSITION"
  "values" => [
    [
      "name" => "Left"
      "value" => "LEFT"
    ]
    [
      "name" => "Right"
      "value" => "RIGHT"
    ]
  ]
  "defaultValue" => "RIGHT"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowEnumComponent {#5355
  +label: "Sidebar position"
  +help: ""
  +settingsKey: "KBIN_GENERAL_SIDEBAR_POSITION"
  +values: [
    [
      "name" => "Left"
      "value" => "LEFT"
    ]
    [
      "name" => "Right"
      "value" => "RIGHT"
    ]
  ]
  +defaultValue: "RIGHT"
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.19 ms
Input props
[
  "label" => "Dynamic lists"
  "settingsKey" => "KBIN_GENERAL_DYNAMIC_LISTS"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7500
  +label: "Dynamic lists"
  +help: ""
  +settingsKey: "KBIN_GENERAL_DYNAMIC_LISTS"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.13 ms
Input props
[
  "label" => "Rounded edges"
  "settingsKey" => "KBIN_GENERAL_ROUNDED_EDGES"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7565
  +label: "Rounded edges"
  +help: ""
  +settingsKey: "KBIN_GENERAL_ROUNDED_EDGES"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.13 ms
Input props
[
  "label" => "Infinite scrolling"
  "help" => "Automatically load more content when you reach the bottom of the page."
  "settingsKey" => "KBIN_GENERAL_INFINITE_SCROLL"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7621
  +label: "Infinite scrolling"
  +help: "Automatically load more content when you reach the bottom of the page."
  +settingsKey: "KBIN_GENERAL_INFINITE_SCROLL"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.15 ms
Input props
[
  "label" => "Sticky navbar"
  "help" => "The navbar will stick to the top of the page when you scroll down."
  "settingsKey" => "KBIN_GENERAL_FIXED_NAVBAR"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7680
  +label: "Sticky navbar"
  +help: "The navbar will stick to the top of the page when you scroll down."
  +settingsKey: "KBIN_GENERAL_FIXED_NAVBAR"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.12 ms
Input props
[
  "label" => "Show top bar"
  "settingsKey" => "KBIN_GENERAL_TOPBAR"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7736
  +label: "Show top bar"
  +help: ""
  +settingsKey: "KBIN_GENERAL_TOPBAR"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.12 ms
Input props
[
  "label" => "Turbo mode (experimental)"
  "settingsKey" => "KBIN_GENERAL_TURBO"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7792
  +label: "Turbo mode (experimental)"
  +help: ""
  +settingsKey: "KBIN_GENERAL_TURBO"
  +defaultValue: false
  +reloadRequired: true
}
user_settings_row_switch App\Twig\Components\UserSettingsRowSwitchComponent 12.0 MiB 0.24 ms
Input props
[
  "label" => "Mark new comments"
  "settingsKey" => "KBIN_MARK_NEW_COMMENTS"
]
Attributes
[]
Component
App\Twig\Components\UserSettingsRowSwitchComponent {#7850
  +label: "Mark new comments"
  +help: ""
  +settingsKey: "KBIN_MARK_NEW_COMMENTS"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.13 ms
Input props
[
  "label" => "Show "Support Us" block"
  "settingsKey" => "KBIN_GENERAL_SUPPORT_US_BLOCK"
  "defaultValue" => true
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#7913
  +label: "Show "Support Us" block"
  +help: ""
  +settingsKey: "KBIN_GENERAL_SUPPORT_US_BLOCK"
  +defaultValue: true
  +reloadRequired: true
}
user_settings_row_switch App\Twig\Components\UserSettingsRowSwitchComponent 12.0 MiB 0.14 ms
Input props
[
  "label" => "Show subscribed users"
  "settingsKey" => "KBIN_SUB_CHANNEL_USERS"
]
Attributes
[]
Component
App\Twig\Components\UserSettingsRowSwitchComponent {#7971
  +label: "Show subscribed users"
  +help: ""
  +settingsKey: "KBIN_SUB_CHANNEL_USERS"
  +defaultValue: false
  +reloadRequired: true
}
user_settings_row_switch App\Twig\Components\UserSettingsRowSwitchComponent 12.0 MiB 0.14 ms
Input props
[
  "label" => "Show subscribed magazines"
  "settingsKey" => "KBIN_SUB_CHANNEL_MAGAZINES"
]
Attributes
[]
Component
App\Twig\Components\UserSettingsRowSwitchComponent {#8027
  +label: "Show subscribed magazines"
  +help: ""
  +settingsKey: "KBIN_SUB_CHANNEL_MAGAZINES"
  +defaultValue: false
  +reloadRequired: true
}
user_settings_row_switch App\Twig\Components\UserSettingsRowSwitchComponent 12.0 MiB 0.13 ms
Input props
[
  "label" => "Show subscribed domains"
  "settingsKey" => "KBIN_SUB_CHANNEL_DOMAINS"
]
Attributes
[]
Component
App\Twig\Components\UserSettingsRowSwitchComponent {#8083
  +label: "Show subscribed domains"
  +help: ""
  +settingsKey: "KBIN_SUB_CHANNEL_DOMAINS"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.12 ms
Input props
[
  "label" => "Auto media preview"
  "help" => "Automatically expand media previews."
  "settingsKey" => "KBIN_ENTRIES_SHOW_PREVIEW"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8139
  +label: "Auto media preview"
  +help: "Automatically expand media previews."
  +settingsKey: "KBIN_ENTRIES_SHOW_PREVIEW"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.16 ms
Input props
[
  "label" => "Compact view"
  "settingsKey" => "KBIN_ENTRIES_COMPACT"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8195
  +label: "Compact view"
  +help: ""
  +settingsKey: "KBIN_ENTRIES_COMPACT"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.14 ms
Input props
[
  "label" => "Show users’ avatars"
  "settingsKey" => "KBIN_ENTRIES_SHOW_USERS_AVATARS"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8251
  +label: "Show users’ avatars"
  +help: ""
  +settingsKey: "KBIN_ENTRIES_SHOW_USERS_AVATARS"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.12 ms
Input props
[
  "label" => "Show magazines’ icons"
  "settingsKey" => "KBIN_ENTRIES_SHOW_MAGAZINES_ICONS"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8307
  +label: "Show magazines’ icons"
  +help: ""
  +settingsKey: "KBIN_ENTRIES_SHOW_MAGAZINES_ICONS"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.13 ms
Input props
[
  "label" => "Show thumbnails"
  "settingsKey" => "KBIN_ENTRIES_SHOW_THUMBNAILS"
  "defaultValue" => true
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8363
  +label: "Show thumbnails"
  +help: ""
  +settingsKey: "KBIN_ENTRIES_SHOW_THUMBNAILS"
  +defaultValue: true
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 1.87 ms
Input props
[
  "label" => "Auto media preview"
  "help" => "Automatically expand media previews."
  "settingsKey" => "KBIN_POSTS_SHOW_PREVIEW"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8419
  +label: "Auto media preview"
  +help: "Automatically expand media previews."
  +settingsKey: "KBIN_POSTS_SHOW_PREVIEW"
  +defaultValue: false
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.22 ms
Input props
[
  "label" => "Show users’ avatars"
  "settingsKey" => "KBIN_POSTS_SHOW_USERS_AVATARS"
  "defaultValue" => true
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8475
  +label: "Show users’ avatars"
  +help: ""
  +settingsKey: "KBIN_POSTS_SHOW_USERS_AVATARS"
  +defaultValue: true
  +reloadRequired: true
}
settings_row_enum App\Twig\Components\SettingsRowEnumComponent 12.0 MiB 0.28 ms
Input props
[
  "label" => "Comment reply position"
  "help" => "Display the comment reply form either at the top or bottom of the page. When 'infinite scroll' is enabled the position will always appear at the top."
  "settingsKey" => "KBIN_COMMENTS_REPLY_POSITION"
  "values" => [
    [
      "name" => "top"
      "value" => "TOP"
    ]
    [
      "name" => "bottom"
      "value" => "BOTTOM"
    ]
  ]
  "defaultValue" => "TOP"
]
Attributes
[]
Component
App\Twig\Components\SettingsRowEnumComponent {#8531
  +label: "Comment reply position"
  +help: "Display the comment reply form either at the top or bottom of the page. When 'infinite scroll' is enabled the position will always appear at the top."
  +settingsKey: "KBIN_COMMENTS_REPLY_POSITION"
  +values: [
    [
      "name" => "top"
      "value" => "TOP"
    ]
    [
      "name" => "bottom"
      "value" => "BOTTOM"
    ]
  ]
  +defaultValue: "TOP"
  +reloadRequired: true
}
settings_row_switch App\Twig\Components\SettingsRowSwitchComponent 12.0 MiB 0.24 ms
Input props
[
  "label" => "Show Comment Avatars"
  "help" => "Display/hide user avatars when viewing comments on a single thread or post."
  "settingsKey" => "KBIN_COMMENTS_SHOW_USER_AVATAR"
  "defaultValue" => true
]
Attributes
[]
Component
App\Twig\Components\SettingsRowSwitchComponent {#8589
  +label: "Show Comment Avatars"
  +help: "Display/hide user avatars when viewing comments on a single thread or post."
  +settingsKey: "KBIN_COMMENTS_SHOW_USER_AVATAR"
  +defaultValue: true
  +reloadRequired: true
}
user_actions App\Twig\Components\UserActionsComponent 12.0 MiB 1.71 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
]
Attributes
[]
Component
App\Twig\Components\UserActionsComponent {#8666
  +user: Proxies\__CG__\App\Entity\User {#1978
    +avatar: null
    +cover: null
    +email: "linuxPIPEpower@discuss.tchncs.de"
    +username: "@linuxPIPEpower@discuss.tchncs.de"
    +roles: []
    +followersCount: 0
    +homepage: "front"
    +about: null
    +lastActive: DateTime @1729147158 {#1515
      date: 2024-10-17 08:39:18.0 +02:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: false
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: true
    +notifyOnNewEntryCommentReply: true
    +notifyOnNewPost: false
    +notifyOnNewPostReply: true
    +notifyOnNewPostCommentReply: true
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: false
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#1519 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#1517 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#1623 …}
    +entries: Doctrine\ORM\PersistentCollection {#1406 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#1713 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#1710 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#1474 …}
    +posts: Doctrine\ORM\PersistentCollection {#1745 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#1485 …}
    +postComments: Doctrine\ORM\PersistentCollection {#1759 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#1637 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#1475 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#1636 …}
    +follows: Doctrine\ORM\PersistentCollection {#1409 …}
    +followers: Doctrine\ORM\PersistentCollection {#1624 …}
    +blocks: Doctrine\ORM\PersistentCollection {#1425 …}
    +blockers: Doctrine\ORM\PersistentCollection {#1441 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#1460 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#1439 …}
    +reports: Doctrine\ORM\PersistentCollection {#1416 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1430 …}
    +violations: Doctrine\ORM\PersistentCollection {#1694 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1700 …}
    +awards: Doctrine\ORM\PersistentCollection {#1434 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#1610 …}
    +categories: Doctrine\ORM\PersistentCollection {#1640 …}
    -id: 86105
    -password: "$2y$13$Rgi337EWK73XZmjZrR9p5eWoelRzbPfN6Qy5guBKm000AhQiYu7w."
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#1669 …}
    +apId: "linuxPIPEpower@discuss.tchncs.de"
    +apProfileId: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apPublicUrl: "https://discuss.tchncs.de/u/linuxPIPEpower"
    +apFollowersUrl: null
    +apInboxUrl: "https://discuss.tchncs.de/inbox"
    +apDomain: "discuss.tchncs.de"
    +apPreferredUsername: "linuxPIPEpower"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: false
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1728132845 {#1516
      date: 2024-10-05 14:54:05.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1705651727 {#1518
      date: 2024-01-19 09:08:47.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
}
date App\Twig\Components\DateComponent 12.0 MiB 0.20 ms
Input props
[
  "date" => DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#8727
  +date: DateTimeImmutable @1706436525 {#2402
    date: 2024-01-28 11:08:45.0 +01:00
  }
}
magazine_box App\Twig\Components\MagazineBoxComponent 12.0 MiB 8.34 ms
Input props
[
  "magazine" => App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  "showSectionTitle" => true
]
Attributes
[]
Component
App\Twig\Components\MagazineBoxComponent {#8783
  +magazine: App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  +showCover: true
  +showDescription: true
  +showRules: true
  +showSubscribeButton: true
  +showInfo: true
  +showMeta: true
  +showSectionTitle: true
  +stretchedLink: true
}
magazine_sub App\Twig\Components\MagazineSubComponent 12.0 MiB 0.75 ms
Input props
[
  "magazine" => App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\MagazineSubComponent {#8841
  +magazine: App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
}
date App\Twig\Components\DateComponent 12.0 MiB 0.20 ms
Input props
[
  "date" => DateTimeImmutable @1698929468 {#271
    date: 2023-11-02 13:51:08.0 +01:00
  }
]
Attributes
[]
Component
App\Twig\Components\DateComponent {#9015
  +date: DateTimeImmutable @1698929468 {#271
    date: 2023-11-02 13:51:08.0 +01:00
  }
}
user_inline App\Twig\Components\UserInlineComponent 12.0 MiB 0.72 ms
Input props
[
  "user" => Proxies\__CG__\App\Entity\User {#9074
    +avatar: null
    +cover: null
    +email: "kbin@j0h.nl"
    +username: "Sprite_tm"
    +roles: [
      "ROLE_ADMIN"
    ]
    +followersCount: 0
    +homepage: "front"
    +about: "Hi! I'm Sprite_tm. You may know me from sites like https://spritesmods.com."
    +lastActive: DateTime @1707547382 {#9121
      date: 2024-02-10 07:43:02.0 +01:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: true
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: false
    +notifyOnNewEntryCommentReply: false
    +notifyOnNewPost: false
    +notifyOnNewPostReply: false
    +notifyOnNewPostCommentReply: false
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: true
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#9123 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#9125 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#9127 …}
    +entries: Doctrine\ORM\PersistentCollection {#9129 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#9131 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#9133 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#9135 …}
    +posts: Doctrine\ORM\PersistentCollection {#9137 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#9139 …}
    +postComments: Doctrine\ORM\PersistentCollection {#9141 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#9143 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#9145 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#9147 …}
    +follows: Doctrine\ORM\PersistentCollection {#9149 …}
    +followers: Doctrine\ORM\PersistentCollection {#9151 …}
    +blocks: Doctrine\ORM\PersistentCollection {#9153 …}
    +blockers: Doctrine\ORM\PersistentCollection {#9155 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#9157 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#9159 …}
    +reports: Doctrine\ORM\PersistentCollection {#9161 …}
    +favourites: Doctrine\ORM\PersistentCollection {#9163 …}
    +violations: Doctrine\ORM\PersistentCollection {#9165 …}
    +notifications: Doctrine\ORM\PersistentCollection {#9167 …}
    +awards: Doctrine\ORM\PersistentCollection {#9169 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#9171 …}
    +categories: Doctrine\ORM\PersistentCollection {#9173 …}
    -id: 1
    -password: "$2y$13$ZX7Aou2QOPRGkHPp4y5x8OWfxZMoT1BGH7bRLlPP7mwZFTkfiaPGG"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#9175 …}
    +apId: null
    +apProfileId: null
    +apPublicUrl: null
    +apFollowersUrl: null
    +apInboxUrl: null
    +apDomain: null
    +apPreferredUsername: null
    +apDiscoverable: null
    +apManuallyApprovesFollowers: null
    +privateKey: """
      -----BEGIN PRIVATE KEY-----\r\n
      MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDleeotz5TBiMlC\r\n
      YsJYJHVNxjvnvt0qsQA282B7vdqBTbARfD49iKPiMIwgU2yhCI0oTSQwc2Zy9AQ+\r\n
      31rwmvBx8VvcLgQvKpNzPVhMQjelK7k5iPiPc/W1soaauepq3YwQKgGod4c5Vh9f\r\n
      MInSANfOLOUSo3pUzfaQaGEvQc5DbKjDgIjsv/OKI1acbzu067KQzIThu+1BvcqQ\r\n
      Ypo2Ux5W23nNqkrRZ++z/r1MI2jS3vwi5OSwz4fWhLPJXE6lwokc6b/uAZe7sLT6\r\n
      QQtjevLnmMyRIVnmxbtHPMSfhLdz8ssQhoNCfAkMnBjDUX31SSs67pU8v5O3Fn2H\r\n
      d+qFWCjrREwSpBAd24INJqKsjSa6j3oLL8Xw8HZf+x6QRPJch/c3FNWRtM2b9n8V\r\n
      sAQiD985pafyeQ1TqIe4iSjI0iUgy2WgwO0C1Z0PNbQzQmRk0EOAlxIXjPmB229P\r\n
      V4+OcZxLT9phP/rid1Qt9Ro+2LdkS9Zqe8c2JHeJKc5Nv/8OOX5uQ/B82JXnuXYi\r\n
      /oVEJb5t42G8u3IIkYM5G/Gt033WU6dbyKOBmdnbXaPw9LC3M7oop3yyCb3UDLfg\r\n
      g/XnZVvZxSPCPlh5G1Lb0r47siKq/0k9YRua0AFsVg0dhqfuwsb6G9Hx5EicuPsu\r\n
      OIjXINBTjlnE4SdMz0ZJt7bLjwlKdQIDAQABAoICAAlWo8QHfYs+sMoF0Njbavam\r\n
      SYvNxZxWJacW0mdWu4ylh7O+dZ31cI3k4d7y5inLeksYkI90MsgczAtu9XlzJLPO\r\n
      WamlKcBtoCCBb5Vy4GbVV61SuKLF2krxn+6uAC8nIusJepXLf3JC4fXyuLkWFbIr\r\n
      O4s9od3Pn+gSh1nv+J/fzSJfmbLgwN1vQLgPAsQDD3o7CHFTP318ZsDnclUhnst0\r\n
      FQnckzzgWO3fQP7XNg3WyzX0UKYtW97L+bEJE55FQ2Us0gWyhOU7dLH2casztqzc\r\n
      F/8T91+fzlZAz9OaCAks6Tyb7L2I5KlhtNRF/bU8rAiy6tnVBgLeZG9d3upcQxX0\r\n
      L+SMPWg55qERGI5mO+BxFdUnVtcmswziKmySYtzgm+c4jmPS5cWhGB9HFCTW2S0x\r\n
      GoVA2cZGWjMTrbZQhgJjBqzp76fhLtXTufd328sYmX7fBYKEWFYNwrEJaWYUNl/V\r\n
      yEyl0aMQWKhVokx6eCqnuDZUc77LeuGuCleIdhQ53NYHrXMCmgVyLfmGdrOS3Uh6\r\n
      RrAYmnvvMkAUTOQajW2csC345PmgBOjE7vB7349ylKUkXvN4L+9xZCYaVjBt3O24\r\n
      aRoQSQDGhk+NIaYleiFx+u7dJSryxdx/6ut6dQ2S+jKlm1oN1qq6ppO5y/TFRQ1e\r\n
      qn7kjIGzUT80fANDFqdhAoIBAQD1+cGiWXRQhUrJc5X3ngH1zHoLWpmSZcUUDFn/\r\n
      bV/CChd2M43fOpneIQETZ1oS7BsU3y92kTw63ytYOUg7C5iT5/r9ZoBGq0HZSbll\r\n
      riRJWGiajr2aYCmIes++CrfUvCcD6+l8QMZ3s8eXdk80GX+vt1xEfRpWV9e9huJK\r\n
      K1e8wXfFmPAmxUi63IePscdc+SVQGeooMYDnMwLWvxpAtp5mGOaQc4D5dviWXjSE\r\n
      Z/PJa+gectpD1iDIPUXm3o17ivE2UYFia8/FCGUN6Yz7ucRKF+2SPO8hLefk5UvJ\r\n
      Lxlkh67MXKkneDqRU9C82Qmcfz5nQLQadC0nbE44YeXrnlIdAoIBAQDu1AWMIe6f\r\n
      7TZYCWnTa3nT6penJ9CMaGDPI/62dKTmGnI4oo3u9DGGrnuWbcFFCQA02vcYdpuw\r\n
      CVy6mkP/yqN5VSV3EHZiJUA0aKIxot3o3YOiobpVYn9hwvzzOdMZO4SOuevNfY1c\r\n
      qmnLGhYoDvR1c2yaudCf/BDwQqlLoSg9F5X57bRtwaRyUjhtXVKXWb59qtiwwrvp\r\n
      1vPjxciEIxAtgSXtIUQz3ljDRNUHjpyfYM3ska5jkxMIPNYUYFMX2x+Gxn9PZEG3\r\n
      Im391BRynZsnkvJO6i4i5N1xsPK5SyPiKBnlMxW/6ZLi5aAQHV3cc2KLzV+T+s2B\r\n
      v9LTAyO7nWo5AoIBAASA/jqqyKZwyl3F8AkIq6CEjfeHQSidFG65iyxSJF65MJTJ\r\n
      fN+Jgye+Evb3/X47NIO9UnEpV6D8VR7YbaonHDQZG09ogRDKMfp4jxx9g8yUAdZS\r\n
      psYc3KXTGdqw94y9pTk9KJlN1lR6xjzPvcOGdAATq2zVnZXXJewifCI/iOu73yWP\r\n
      F1aeZiaFwzWuW6goJ7a/wrnZrjKNjI/CEAj/TwcvjYk3lDT9KLAYKX4DKUOW5jko\r\n
      gTacxRzlglIn4Q9SC/iipWvX7YX+EVuf2yUA0cdJiOAUnYxN+uEGEc0tP5nHoju7\r\n
      tp0yZmAi2L+cecCT0+CwHpwdZHZEVWpS4JLf40ECggEBALFSZIgGDZlaU5YL7zHV\r\n
      Q5APRugKDLKjMPW7IPwxINnj2tioAL/hOQBpfkNTXEM4ipmz1fCo57FNUjcOINzD\r\n
      hJqqmHWNmIgIZmJDKeG2rhKenYTblXCeADwCvTKNxWmfoi0iZ6ybwqCBuqjcxoSZ\r\n
      jfHCcGl0+yw9yAnLRM1ta2XopCb70ZIIS2PCHjk9J/xN2ryNY/PhsgnN2ilMiTNq\r\n
      oTFYCWPF5lCojrj020KQJUPEaUBzbcpqwZ/FI6HfXvKAdCjqKk40/wHNI2Np2oC6\r\n
      +h7o4NWs0/J+gNhP6/edjZf19DwTsNtbvf6PRUeRtkXeudVY99T0Sy9B0HNxik9b\r\n
      cikCggEAM2wassiP1i0Gc3wrbNLHyQN+yqMaAp0xF+8l0fU3T8zPL/tYDcITnZPY\r\n
      pEFV/aodP9X7XFuQD0iGTOTGDXiMSLPOLI/ifmwbT41rgIN9x14MpU2EtWeVz7sx\r\n
      ZIFMt98rHx6BsZx/DnSFDQ8iqrKF3u+OOv7s6j+8odz4Rq53+16vMev5VUMOPq+E\r\n
      aQn8SDKkOjZzwb9QGB9bXS5s9yyj4pLyggQ0O5S2ugZjUcmCecNpktN8bUR3I9VQ\r\n
      KWkcQa9yCpidp/JYrQtlbqAPiIzptA4T4RNh+F6pKbmw7hNMIPipPzbQezEMaBOn\r\n
      Cgb38EldyAVGjCzRGfhu9SNU9B03bg==\r\n
      -----END PRIVATE KEY-----
      """
    +publicKey: """
      -----BEGIN PUBLIC KEY-----\r\n
      MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5XnqLc+UwYjJQmLCWCR1\r\n
      TcY7577dKrEANvNge73agU2wEXw+PYij4jCMIFNsoQiNKE0kMHNmcvQEPt9a8Jrw\r\n
      cfFb3C4ELyqTcz1YTEI3pSu5OYj4j3P1tbKGmrnqat2MECoBqHeHOVYfXzCJ0gDX\r\n
      zizlEqN6VM32kGhhL0HOQ2yow4CI7L/ziiNWnG87tOuykMyE4bvtQb3KkGKaNlMe\r\n
      Vtt5zapK0Wfvs/69TCNo0t78IuTksM+H1oSzyVxOpcKJHOm/7gGXu7C0+kELY3ry\r\n
      55jMkSFZ5sW7RzzEn4S3c/LLEIaDQnwJDJwYw1F99UkrOu6VPL+TtxZ9h3fqhVgo\r\n
      60RMEqQQHduCDSairI0muo96Cy/F8PB2X/sekETyXIf3NxTVkbTNm/Z/FbAEIg/f\r\n
      OaWn8nkNU6iHuIkoyNIlIMtloMDtAtWdDzW0M0JkZNBDgJcSF4z5gdtvT1ePjnGc\r\n
      S0/aYT/64ndULfUaPti3ZEvWanvHNiR3iSnOTb//Djl+bkPwfNiV57l2Iv6FRCW+\r\n
      beNhvLtyCJGDORvxrdN91lOnW8ijgZnZ212j8PSwtzO6KKd8sgm91Ay34IP152Vb\r\n
      2cUjwj5YeRtS29K+O7Iiqv9JPWEbmtABbFYNHYan7sLG+hvR8eRInLj7LjiI1yDQ\r\n
      U45ZxOEnTM9GSbe2y48JSnUCAwEAAQ==\r\n
      -----END PUBLIC KEY-----
      """
    +apFetchedAt: null
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1686560440 {#9122
      date: 2023-06-12 11:00:40.0 +02:00
    }
    +__isInitialized__: true
     …2
  }
]
Attributes
[]
Component
App\Twig\Components\UserInlineComponent {#9092
  +user: Proxies\__CG__\App\Entity\User {#9074
    +avatar: null
    +cover: null
    +email: "kbin@j0h.nl"
    +username: "Sprite_tm"
    +roles: [
      "ROLE_ADMIN"
    ]
    +followersCount: 0
    +homepage: "front"
    +about: "Hi! I'm Sprite_tm. You may know me from sites like https://spritesmods.com."
    +lastActive: DateTime @1707547382 {#9121
      date: 2024-02-10 07:43:02.0 +01:00
    }
    +markedForDeletionAt: null
    +fields: null
    +oauthGithubId: null
    +oauthGoogleId: null
    +oauthFacebookId: null
    +oauthKeycloakId: null
    +hideAdult: true
    +showSubscribedUsers: true
    +showSubscribedMagazines: true
    +showSubscribedDomains: true
    +preferredLanguages: []
    +featuredMagazines: null
    +showProfileSubscriptions: true
    +showProfileFollowings: true
    +markNewComments: false
    +notifyOnNewEntry: false
    +notifyOnNewEntryReply: false
    +notifyOnNewEntryCommentReply: false
    +notifyOnNewPost: false
    +notifyOnNewPostReply: false
    +notifyOnNewPostCommentReply: false
    +addMentionsEntries: false
    +addMentionsPosts: true
    +isBanned: false
    +isVerified: true
    +isDeleted: false
    +isBot: false
    +spamProtection: true
    +customCss: null
    +ignoreMagazinesCustomCss: false
    +moderatorTokens: Doctrine\ORM\PersistentCollection {#9123 …}
    +magazineOwnershipRequests: Doctrine\ORM\PersistentCollection {#9125 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#9127 …}
    +entries: Doctrine\ORM\PersistentCollection {#9129 …}
    +entryVotes: Doctrine\ORM\PersistentCollection {#9131 …}
    +entryComments: Doctrine\ORM\PersistentCollection {#9133 …}
    +entryCommentVotes: Doctrine\ORM\PersistentCollection {#9135 …}
    +posts: Doctrine\ORM\PersistentCollection {#9137 …}
    +postVotes: Doctrine\ORM\PersistentCollection {#9139 …}
    +postComments: Doctrine\ORM\PersistentCollection {#9141 …}
    +postCommentVotes: Doctrine\ORM\PersistentCollection {#9143 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#9145 …}
    +subscribedDomains: Doctrine\ORM\PersistentCollection {#9147 …}
    +follows: Doctrine\ORM\PersistentCollection {#9149 …}
    +followers: Doctrine\ORM\PersistentCollection {#9151 …}
    +blocks: Doctrine\ORM\PersistentCollection {#9153 …}
    +blockers: Doctrine\ORM\PersistentCollection {#9155 …}
    +blockedMagazines: Doctrine\ORM\PersistentCollection {#9157 …}
    +blockedDomains: Doctrine\ORM\PersistentCollection {#9159 …}
    +reports: Doctrine\ORM\PersistentCollection {#9161 …}
    +favourites: Doctrine\ORM\PersistentCollection {#9163 …}
    +violations: Doctrine\ORM\PersistentCollection {#9165 …}
    +notifications: Doctrine\ORM\PersistentCollection {#9167 …}
    +awards: Doctrine\ORM\PersistentCollection {#9169 …}
    +subscribedCategories: Doctrine\ORM\PersistentCollection {#9171 …}
    +categories: Doctrine\ORM\PersistentCollection {#9173 …}
    -id: 1
    -password: "$2y$13$ZX7Aou2QOPRGkHPp4y5x8OWfxZMoT1BGH7bRLlPP7mwZFTkfiaPGG"
    -totpSecret: null
    -totpBackupCodes: []
    -oAuth2UserConsents: Doctrine\ORM\PersistentCollection {#9175 …}
    +apId: null
    +apProfileId: null
    +apPublicUrl: null
    +apFollowersUrl: null
    +apInboxUrl: null
    +apDomain: null
    +apPreferredUsername: null
    +apDiscoverable: null
    +apManuallyApprovesFollowers: null
    +privateKey: """
      -----BEGIN PRIVATE KEY-----\r\n
      MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDleeotz5TBiMlC\r\n
      YsJYJHVNxjvnvt0qsQA282B7vdqBTbARfD49iKPiMIwgU2yhCI0oTSQwc2Zy9AQ+\r\n
      31rwmvBx8VvcLgQvKpNzPVhMQjelK7k5iPiPc/W1soaauepq3YwQKgGod4c5Vh9f\r\n
      MInSANfOLOUSo3pUzfaQaGEvQc5DbKjDgIjsv/OKI1acbzu067KQzIThu+1BvcqQ\r\n
      Ypo2Ux5W23nNqkrRZ++z/r1MI2jS3vwi5OSwz4fWhLPJXE6lwokc6b/uAZe7sLT6\r\n
      QQtjevLnmMyRIVnmxbtHPMSfhLdz8ssQhoNCfAkMnBjDUX31SSs67pU8v5O3Fn2H\r\n
      d+qFWCjrREwSpBAd24INJqKsjSa6j3oLL8Xw8HZf+x6QRPJch/c3FNWRtM2b9n8V\r\n
      sAQiD985pafyeQ1TqIe4iSjI0iUgy2WgwO0C1Z0PNbQzQmRk0EOAlxIXjPmB229P\r\n
      V4+OcZxLT9phP/rid1Qt9Ro+2LdkS9Zqe8c2JHeJKc5Nv/8OOX5uQ/B82JXnuXYi\r\n
      /oVEJb5t42G8u3IIkYM5G/Gt033WU6dbyKOBmdnbXaPw9LC3M7oop3yyCb3UDLfg\r\n
      g/XnZVvZxSPCPlh5G1Lb0r47siKq/0k9YRua0AFsVg0dhqfuwsb6G9Hx5EicuPsu\r\n
      OIjXINBTjlnE4SdMz0ZJt7bLjwlKdQIDAQABAoICAAlWo8QHfYs+sMoF0Njbavam\r\n
      SYvNxZxWJacW0mdWu4ylh7O+dZ31cI3k4d7y5inLeksYkI90MsgczAtu9XlzJLPO\r\n
      WamlKcBtoCCBb5Vy4GbVV61SuKLF2krxn+6uAC8nIusJepXLf3JC4fXyuLkWFbIr\r\n
      O4s9od3Pn+gSh1nv+J/fzSJfmbLgwN1vQLgPAsQDD3o7CHFTP318ZsDnclUhnst0\r\n
      FQnckzzgWO3fQP7XNg3WyzX0UKYtW97L+bEJE55FQ2Us0gWyhOU7dLH2casztqzc\r\n
      F/8T91+fzlZAz9OaCAks6Tyb7L2I5KlhtNRF/bU8rAiy6tnVBgLeZG9d3upcQxX0\r\n
      L+SMPWg55qERGI5mO+BxFdUnVtcmswziKmySYtzgm+c4jmPS5cWhGB9HFCTW2S0x\r\n
      GoVA2cZGWjMTrbZQhgJjBqzp76fhLtXTufd328sYmX7fBYKEWFYNwrEJaWYUNl/V\r\n
      yEyl0aMQWKhVokx6eCqnuDZUc77LeuGuCleIdhQ53NYHrXMCmgVyLfmGdrOS3Uh6\r\n
      RrAYmnvvMkAUTOQajW2csC345PmgBOjE7vB7349ylKUkXvN4L+9xZCYaVjBt3O24\r\n
      aRoQSQDGhk+NIaYleiFx+u7dJSryxdx/6ut6dQ2S+jKlm1oN1qq6ppO5y/TFRQ1e\r\n
      qn7kjIGzUT80fANDFqdhAoIBAQD1+cGiWXRQhUrJc5X3ngH1zHoLWpmSZcUUDFn/\r\n
      bV/CChd2M43fOpneIQETZ1oS7BsU3y92kTw63ytYOUg7C5iT5/r9ZoBGq0HZSbll\r\n
      riRJWGiajr2aYCmIes++CrfUvCcD6+l8QMZ3s8eXdk80GX+vt1xEfRpWV9e9huJK\r\n
      K1e8wXfFmPAmxUi63IePscdc+SVQGeooMYDnMwLWvxpAtp5mGOaQc4D5dviWXjSE\r\n
      Z/PJa+gectpD1iDIPUXm3o17ivE2UYFia8/FCGUN6Yz7ucRKF+2SPO8hLefk5UvJ\r\n
      Lxlkh67MXKkneDqRU9C82Qmcfz5nQLQadC0nbE44YeXrnlIdAoIBAQDu1AWMIe6f\r\n
      7TZYCWnTa3nT6penJ9CMaGDPI/62dKTmGnI4oo3u9DGGrnuWbcFFCQA02vcYdpuw\r\n
      CVy6mkP/yqN5VSV3EHZiJUA0aKIxot3o3YOiobpVYn9hwvzzOdMZO4SOuevNfY1c\r\n
      qmnLGhYoDvR1c2yaudCf/BDwQqlLoSg9F5X57bRtwaRyUjhtXVKXWb59qtiwwrvp\r\n
      1vPjxciEIxAtgSXtIUQz3ljDRNUHjpyfYM3ska5jkxMIPNYUYFMX2x+Gxn9PZEG3\r\n
      Im391BRynZsnkvJO6i4i5N1xsPK5SyPiKBnlMxW/6ZLi5aAQHV3cc2KLzV+T+s2B\r\n
      v9LTAyO7nWo5AoIBAASA/jqqyKZwyl3F8AkIq6CEjfeHQSidFG65iyxSJF65MJTJ\r\n
      fN+Jgye+Evb3/X47NIO9UnEpV6D8VR7YbaonHDQZG09ogRDKMfp4jxx9g8yUAdZS\r\n
      psYc3KXTGdqw94y9pTk9KJlN1lR6xjzPvcOGdAATq2zVnZXXJewifCI/iOu73yWP\r\n
      F1aeZiaFwzWuW6goJ7a/wrnZrjKNjI/CEAj/TwcvjYk3lDT9KLAYKX4DKUOW5jko\r\n
      gTacxRzlglIn4Q9SC/iipWvX7YX+EVuf2yUA0cdJiOAUnYxN+uEGEc0tP5nHoju7\r\n
      tp0yZmAi2L+cecCT0+CwHpwdZHZEVWpS4JLf40ECggEBALFSZIgGDZlaU5YL7zHV\r\n
      Q5APRugKDLKjMPW7IPwxINnj2tioAL/hOQBpfkNTXEM4ipmz1fCo57FNUjcOINzD\r\n
      hJqqmHWNmIgIZmJDKeG2rhKenYTblXCeADwCvTKNxWmfoi0iZ6ybwqCBuqjcxoSZ\r\n
      jfHCcGl0+yw9yAnLRM1ta2XopCb70ZIIS2PCHjk9J/xN2ryNY/PhsgnN2ilMiTNq\r\n
      oTFYCWPF5lCojrj020KQJUPEaUBzbcpqwZ/FI6HfXvKAdCjqKk40/wHNI2Np2oC6\r\n
      +h7o4NWs0/J+gNhP6/edjZf19DwTsNtbvf6PRUeRtkXeudVY99T0Sy9B0HNxik9b\r\n
      cikCggEAM2wassiP1i0Gc3wrbNLHyQN+yqMaAp0xF+8l0fU3T8zPL/tYDcITnZPY\r\n
      pEFV/aodP9X7XFuQD0iGTOTGDXiMSLPOLI/ifmwbT41rgIN9x14MpU2EtWeVz7sx\r\n
      ZIFMt98rHx6BsZx/DnSFDQ8iqrKF3u+OOv7s6j+8odz4Rq53+16vMev5VUMOPq+E\r\n
      aQn8SDKkOjZzwb9QGB9bXS5s9yyj4pLyggQ0O5S2ugZjUcmCecNpktN8bUR3I9VQ\r\n
      KWkcQa9yCpidp/JYrQtlbqAPiIzptA4T4RNh+F6pKbmw7hNMIPipPzbQezEMaBOn\r\n
      Cgb38EldyAVGjCzRGfhu9SNU9B03bg==\r\n
      -----END PRIVATE KEY-----
      """
    +publicKey: """
      -----BEGIN PUBLIC KEY-----\r\n
      MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5XnqLc+UwYjJQmLCWCR1\r\n
      TcY7577dKrEANvNge73agU2wEXw+PYij4jCMIFNsoQiNKE0kMHNmcvQEPt9a8Jrw\r\n
      cfFb3C4ELyqTcz1YTEI3pSu5OYj4j3P1tbKGmrnqat2MECoBqHeHOVYfXzCJ0gDX\r\n
      zizlEqN6VM32kGhhL0HOQ2yow4CI7L/ziiNWnG87tOuykMyE4bvtQb3KkGKaNlMe\r\n
      Vtt5zapK0Wfvs/69TCNo0t78IuTksM+H1oSzyVxOpcKJHOm/7gGXu7C0+kELY3ry\r\n
      55jMkSFZ5sW7RzzEn4S3c/LLEIaDQnwJDJwYw1F99UkrOu6VPL+TtxZ9h3fqhVgo\r\n
      60RMEqQQHduCDSairI0muo96Cy/F8PB2X/sekETyXIf3NxTVkbTNm/Z/FbAEIg/f\r\n
      OaWn8nkNU6iHuIkoyNIlIMtloMDtAtWdDzW0M0JkZNBDgJcSF4z5gdtvT1ePjnGc\r\n
      S0/aYT/64ndULfUaPti3ZEvWanvHNiR3iSnOTb//Djl+bkPwfNiV57l2Iv6FRCW+\r\n
      beNhvLtyCJGDORvxrdN91lOnW8ijgZnZ212j8PSwtzO6KKd8sgm91Ay34IP152Vb\r\n
      2cUjwj5YeRtS29K+O7Iiqv9JPWEbmtABbFYNHYan7sLG+hvR8eRInLj7LjiI1yDQ\r\n
      U45ZxOEnTM9GSbe2y48JSnUCAwEAAQ==\r\n
      -----END PUBLIC KEY-----
      """
    +apFetchedAt: null
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1686560440 {#9122
      date: 2023-06-12 11:00:40.0 +02:00
    }
    +__isInitialized__: true
     …2
  }
  +showAvatar: true
}
related_magazines App\Twig\Components\RelatedMagazinesComponent 12.0 MiB 2.70 ms
Input props
[
  "magazine" => "linux@lemmy.ml"
  "tag" => null
]
Attributes
[]
Component
App\Twig\Components\RelatedMagazinesComponent {#9283
  +limit: 4
  +tag: null
  +magazine: "linux@lemmy.ml"
  +type: "magazine"
  +title: "related_magazines"
  +refreshedRandom: false
  -repository: App\Repository\MagazineRepository {#333 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
active_users App\Twig\Components\ActiveUsersComponent 12.0 MiB 0.34 ms
Input props
[
  "magazine" => App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\ActiveUsersComponent {#9370
  +magazine: App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  -userRepository: App\Repository\UserRepository {#603 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
related_categories App\Twig\Components\RelatedCategoriesComponent 12.0 MiB 4.63 ms
Input props
[
  "magazine" => "linux@lemmy.ml"
  "tag" => null
]
Attributes
[]
Component
App\Twig\Components\RelatedCategoriesComponent {#9429
  +limit: 4
  +tag: null
  +magazine: "linux@lemmy.ml"
  +type: "related"
  +title: "related_categories"
  +refreshedRandom: false
  -repository: App\Repository\CategoryRepository {#9430 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
}
related_posts App\Twig\Components\RelatedPostsComponent 12.0 MiB 1.39 ms
Input props
[
  "magazine" => "linux@lemmy.ml"
  "tag" => null
]
Attributes
[]
Component
App\Twig\Components\RelatedPostsComponent {#9500
  +limit: 4
  +tag: null
  +magazine: "linux@lemmy.ml"
  +type: "magazine"
  +post: null
  +title: "related_posts"
  +refreshedRandom: false
  -repository: App\Repository\PostRepository {#9499 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -mentionManager: App\Service\MentionManager {#389 …}
}
related_entries App\Twig\Components\RelatedEntriesComponent 12.0 MiB 2.04 ms
Input props
[
  "magazine" => "linux@lemmy.ml"
  "tag" => null
]
Attributes
[]
Component
App\Twig\Components\RelatedEntriesComponent {#9569
  +limit: 4
  +tag: null
  +magazine: "linux@lemmy.ml"
  +type: "magazine"
  +entry: null
  +title: "related_entries"
  +refreshedRandom: false
  -repository: App\Repository\EntryRepository {#270 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -twig: Twig\Environment {#1252 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -mentionManager: App\Service\MentionManager {#389 …}
}
support_us_block App\Twig\Components\SupportUsBlock 12.0 MiB 0.20 ms
Input props
[]
Attributes
[]
Component
App\Twig\Components\SupportUsBlock {#9638
  +subject: ? App\Entity\Contracts\VotableInterface
  +url: ? string
  -twig: Twig\Environment {#1252 …}
  -cache: Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter {#600 …}
  -requestStack: Symfony\Component\HttpFoundation\RequestStack {#1328 …}
  -partnerBlockRepository: App\Repository\PartnerBlockRepository {#9639 …}
}
featured_magazines App\Twig\Components\FeaturedMagazinesComponent 12.0 MiB 0.84 ms
Input props
[
  "magazine" => App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
]
Attributes
[]
Component
App\Twig\Components\FeaturedMagazinesComponent {#9727
  +magazine: App\Entity\Magazine {#265
    +icon: Proxies\__CG__\App\Entity\Image {#246 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#275
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#237 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
    +entries: Doctrine\ORM\PersistentCollection {#180 …}
    +posts: Doctrine\ORM\PersistentCollection {#138 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
    +bans: Doctrine\ORM\PersistentCollection {#117 …}
    +reports: Doctrine\ORM\PersistentCollection {#103 …}
    +badges: Doctrine\ORM\PersistentCollection {#81 …}
    +logs: Doctrine\ORM\PersistentCollection {#71 …}
    +awards: Doctrine\ORM\PersistentCollection {#1346 …}
    +categories: Doctrine\ORM\PersistentCollection {#1823 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#269
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#271
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  -twig: Twig\Environment {#1252 …}
  -repository: App\Repository\MagazineRepository {#333 …}
}