Another dump of some information that i may need again in the future.
Example Code:
#!/bin/bash
echo -e "What is your favorite color?"
read choice
echo "$choice is your favorite color."
#!/bin/bash
echo -e "What is your favorite color?"
read choice
echo "$choice is your favorite color."
TLDR - Basically using read you can take text input. Echo will allow you echo is out to the prompt. You can also interact now with the variable $choice with other command such as grep or awk
You can also use '-x' when executing your Bash Scripts to print it onscreen as it runs through in the event there is any errors or debugging needed.
Comments
Post a Comment