Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

512 bytes added, 09:39, 3 March 2021
INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS
=INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS=
In this section, you will learn how to use command substitution and math operations in your shell scripts.   '''Perform the Following Steps:command substitution''' # Confirm that you are located in your and '''homemath operations''' directory in your Matrix accountshell scripts.<br><br>  
'''Command Substitution'''
Command Substitution is a method of running a Linux command that provides stdout which are used as arguments for another Linux command.
''For example:''
<span style="font-family:courier;font-weight:bold;">echo "The current date and time is: $(date)"</span>
Let's create a Bash shell script that uses command substitution that displays '''text''' and values of '''environment variables''' in a series of <span style="font-family:courier;font-weight:bold;">echo</span> statements.
'''Perform the Following Steps:'''
# Confirm that you are located in your '''home''' directory in your Matrix account.<br><br>
=INVESTIGATION 4: USING CONTROL FLOW STATEMENTS =
13,420
edits

Navigation menu