Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

4 bytes added, 06:33, 18 July 2020
INVESTIGATION 1: CREATING A SHELL SCRIPT
# Issue the following linux command to check if your intended shell script name<br>is already exists to be run automatically from the Bash shell:<br><span style="color:blue;font-weight:bold;font-family:courier;">which hello</span><br><br>You should notice that there is no output and therefore, this shell script name can be used.<br>On the other hand, if you wanted to create a file called sed, then the '''which sed''' command<br>would indicate it is already being used by the shell and that '''sed''' wouldn't be an appropriate shell script name to use.<br><br>
# Use a text editor like vi or nano to create the text file called hello (eg. <span style="color:blue;font-weight:bold;font-family:courier;">vi hello</span>)<br><br>
# Enter the following line in your shell script, replacing "your name" with your actual name:<br><span style="font-family:courier;">echo "Hello Your Name"</span>)<br><br>#x  
::In the next investigation, you will learn to create and run shell scripts that<br>use variables, positional and special parameters.<br><br>
13,420
edits

Navigation menu