update greet example
This commit is contained in:
parent
c105d8b0b6
commit
a5d5d6997c
2 changed files with 14 additions and 14 deletions
14
README.org
14
README.org
|
|
@ -331,14 +331,14 @@
|
||||||
# Actual script
|
# Actual script
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
|
||||||
sfget "Enter your name" # Get input
|
sfget "Enter your name" # Get input
|
||||||
echo "Hello ${sfin}!" # Use input
|
echo "Hello ${sfin}!" # Use input
|
||||||
|
|
||||||
sfask "Do you want to tell me your age" # Ask for YES/no
|
sfask "Do you want to tell me your age" # Ask for YES/no
|
||||||
if [ "$sfin" == true ]; then # Use answer
|
if [ "$sfin" == true ]; then # Use answer
|
||||||
sfget "Enter your Age" # Get input
|
sfget "Enter your Age" # Get input
|
||||||
sfask "Is ${sftbf}${sfin}${sftrs} really your age" "no" # Use input and ask for yes/NO
|
sfask "Is $sfin really your age" "no" # Use input and ask for yes/NO
|
||||||
if [ "$sfin" == true ]; then # Use answer
|
if [ "$sfin" == true ]; then # Use answer
|
||||||
echo "Great!"
|
echo "Great!"
|
||||||
else
|
else
|
||||||
echo "I knew it!"
|
echo "I knew it!"
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,14 @@ source "$(dirname $0)/../sf"
|
||||||
# Actual script
|
# Actual script
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
|
||||||
sfget "Enter your name" # Get input
|
sfget "Enter your name" # Get input
|
||||||
echo "Hello ${sfin}!" # Use input
|
echo "Hello ${sfin}!" # Use input
|
||||||
|
|
||||||
sfask "Do you want to tell me your age" # Ask for YES/no
|
sfask "Do you want to tell me your age" # Ask for YES/no
|
||||||
if [ "$sfin" == true ]; then # Use answer
|
if [ "$sfin" == true ]; then # Use answer
|
||||||
sfget "Enter your Age" # Get input
|
sfget "Enter your Age" # Get input
|
||||||
sfask "Is ${sftbf}${sfin}${sftrs} really your age" "no" # Use input and ask for yes/NO
|
sfask "Is $sfin really your age" "no" # Use input and ask for yes/NO
|
||||||
if [ "$sfin" == true ]; then # Use answer
|
if [ "$sfin" == true ]; then # Use answer
|
||||||
echo "Great!"
|
echo "Great!"
|
||||||
else
|
else
|
||||||
echo "I knew it!"
|
echo "I knew it!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue