Assigning output of zenity to a variable

I have a script that makes a GUI list here:

zenity  --list --text="Choose action" --column= --hide-header opt1 opt2 opt3

How can I make this output be assigned to a variable?

Answers


OUT=$(zenity --list --text="Choose action" --column= --hide-header opt1 opt2 opt3)

This will assign the output to $OUT.

The $() operator performs Command Substitution, i.e. allows the output of a command to replace the command itself.


Need Your Help

Matrix mult order in Direct3D

directx 3d

I've received two conflicting answers in terms of multiplying matrices in Direct3D to achieve results. Tutorials do state to multiply from left to right and that's fine but it's not how I would vis...

Ignoring Webkit-specific CSS selector in Firefox

css firefox google-chrome webkit css-selectors

I'm working on a jQuery theme which includes styling for as many form elements as possible.