I'm trying to return a string from shell script to python getting the below error.
./whiptail.sh: 10: return: Illegal number: uuiiu
i tried running the whiptail command within python directly using subprocess.Popen even at that point im not able to read the user input from python.. If anyone tried this please let me know how to solve this issue.
shell script snippet
#!/bin/sh COLOR=$(whiptail --inputbox "What is your favorite Color?" 8 78 Blue --title "Example Dialog" 3>&1 1>&2 2>&3) # A trick to swap stdout and stderr. # Again, you can pack this inside if, but it seems really long for some 80-col terminal users. exitstatus=$? if [ $exitstatus = 0 ]; then echo "User selected Ok and entered " $COLOR return $COLOR else echo "User selected Cancel." fi echo "(Exit status was $exitstatus)"