Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

277 bytes added, 10:10, 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>
# xYou 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?# Exit your current Bash shell session.<br><br>
13,420
edits

Navigation menu