Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

1 byte added, 09:56, 3 March 2021
INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS
# Confirm that you are located in your '''home''' directory in your Matrix account.<br><br>
# Use a text editor to create a Bash shell script called '''command-substitution.bash'''<br><br>
# Add the following lines to the beginning of this file:<br><span style="font-family:courier;">#!/bin/bash<br>echo "MY ACCOUNT INFORMATION:"<br>echo<br>echo "Username: $(whoami)"<br>echo<br>echo "Current Directory: $(pwd)"<br>echo<br>echo "Number of files in current directory: $(ls | wc -1)"<br>echo<br></span><br><br>
# Save your editing changes and exit your text editor.<br><br>
# Issue the '''chmod''' command to add execute permissions for the user for the '''command-substitution.bash''' file.<br><br>
13,420
edits

Navigation menu