so i am writing a small bash script to automate a few tasks...and i have stumbled on to a issue here.. my problem is
val=$ ( yad --center --width=300 --height=100 --title "Alert" --image "dialog-question" --buttons-layout=center --text "Search for Broadcast Stations ?" \ --button=gtk-yes:0 --button=gtk-no:1 )
if [[ $val == 0 ]]; then
The Above piece of code is not working out ... what i am trying to do here is save the exit code of the YAD window to the val variable then use it in the if then statement.... what mistake am i doing here ???? i know the exit status check is $? but i am totally lost on how to actually implement it though ..!!
This is a full working example based on YAD Wiki examples: