Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

213 bytes added, 10:15, 4 August 2020
INVESTIGATION 3: USING STARTUP FILES
# Enter the following lines in your shell script (the symbol "<span style="font-family:courier;">[</span>" is the open square bracket symbol):<br><span style="font-family:courier;">clear<br>echo -e -n "\e[0;34m"<br>echo "Last Time Logged in (for security):"<br>echo<br>lastlog -u $USER<br>echo<br>echo -e -n "\e[m"</span><br><br>
# Save your editing session and exit the text editor (eg. with vi: press '''ESC''', then type ''':wx''' followed by '''ENTER''').<br><br>
# You can test run the startup file without exiting and re-entering your Bash shell environment.<br>Issue the following:<br><span style="color:blue;font-weight:bold;font-family:courier;">. ~/.bashrc</span><br><br>What do you notice?<br><br>
# Exit your current Bash shell session.<br><br>
# '''Login''' again to your matrix account.<br><br>Did you start-up file customize your Bash shell environment with colours?<br><br>
#Issue the following linux command to restore your previous settings for your bashrc startup file:<br><span style="color:blue;font-weight:bold;font-family:courier;">mv ~/.bashrc.bk ~/.bashrc</span><br><br>
: After you complete the Review Questions sections to get additional practice, then work on your<br>online assignment 3.
13,420
edits

Navigation menu