Question: Create a Bash login file with the following settings # Environment variables: Set your history size to 100 Include the directory IFT250 as the first

  1. Create a Bash login file with the following settings
    1. # Environment variables:
  • Set your history size to 100
  • Include the directory IFT250 as the first directory of your PATH
  • Set the VISUAL environment variable to vi

  1. # Bash shell prompt

Set your prompt to the login shell followed by underscore, then !$ and a space. For example, if your login shell is Bourne, your prompt should be: sh_!$

Note: To extract a basename (eg. sh) from a pathname (e. g. /usr/bin/sh), you can use the command basename $pathname

  1. # File creation

Set your umask to 077

  1. # Display the following Welcome Message

Welcome

Today is

  1. # Display the following system information

The command last shows listing of last logged in users.

The command logname print the users login name

If you combine the commands last with logname (last `logname`), it displays the listing of the last logged in for the user

To get the users last 3 logins, you can use the command: last `logname` | head -3

The users command display a one-line list of users currently logged in

Use the above command to display the following system information:

Last three logins:

Current users:

  1. # Execute your environment file

if [ -f ${HOME}/.bashrc ]

then source ${HOME}/.bashrc

fi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!