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 ]]; thenThe above piece of code is not working out. I am trying to save the exit code of the YAD window to the val variable and 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!