Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

76 bytes added, 08:24, 19 July 2020
INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS
# Add the following lines to the bottom of the file:<br><span style="font-family:courier;">#!/bin/bash<br>age=25<br>readonly age<br>read -p "Enter your Full Name" name<br>read -p "Enter your age (in years): " age<br>echo "Hello $name - You are $age years old"</span><br><br>
# Save your editing changes and exit your text editor.<br><br>
# Issue the following to run the user-variables.bash Bash shell script:<br><span style="color:blue;font-weight:bold;font-family:courier;">./user-variables.bash</span><br><br>What do you notice when you try to change the age variable? Why?<br><br># x
In the next investigation, you will ...
13,420
edits

Navigation menu