Created
May 15, 2013 17:29
-
-
Save arcolife/5585719 to your computer and use it in GitHub Desktop.
an example shell script to demonstrate illustrate use of shell script + zenity to make a GUI..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
zenity --forms --title="Add Friend" \ | |
--text="Enter information about your friend." \ | |
--separator="," \ | |
--add-entry="First Name" \ | |
--add-entry="Family Name" \ | |
--add-entry="Email" \ | |
--add-calendar="Birthday" >> addr.csv | |
case $? in | |
0) | |
echo "Friend added.";; | |
1) | |
echo "No friend added." | |
;; | |
-1) | |
echo "An unexpected error has occurred." | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment