#!/bin/bash # Write a shell script called hello which output the following: # + Your username # + The time and date # + Who is logged on # + also output a line of asterices (*******) after each section # function to display a line of asterices function line(){ echo "*************************************************" } echo "Your username : $(echo $USER)" line # call function echo "Current date and time : $(date)" line echo "Currently logged on users:" who line
Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our email newsletter to make sure you don't miss a single tip/tricks.
- Download Script
- Email this to a friend
- Printable version
- Rss Feed
{ 0 comments… add one now }