Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

17 bytes added, 09:35, 16 March 2021
INVESTIGATION 2: SHE-BANG LINE / VARIABLES / PARAMETERS
# Save your editing changes and exit your text editor.<br><br>[[Image:user-variable1.png|thumb|right|300px|Prompting user to enter data via the '''read -p''' command storing into '''user-created variable'''.]]
# Issue the '''chmod''' command to add '''execute permissions'''<br>for the '''user-variables.bash''' file.<br><br>
# Issue the following to run the user-variables.bash Bash shell script<br> (enter '''your Full name ''' and '''your age ''' when prompted):<br><span style="color:blue;font-weight:bold;font-family:courier;">./user-variables.bash</span><br><br>What did you notice?<br><br>
# Use a text editor to '''modify''' your Bash shell script called '''user-variables.bash'''<br><br>
# '''Insert''' the following lines immediately <u>'''below'''</u> the '''she-bang''' line:<br><span style="font-family:courier;font-weight:bold;">age=25<br>readonly age</span><br><br>
13,420
edits

Navigation menu