The Bash Shell Lab Exercises
Lab 1—First Script
Write a script called greetme that will:
Contain a comment section with your name, the name of this script, and the purpose of this script.
Greet the user.
Print the date and the time.
Print a calendar for this month.
Print the name of your machine.
Print the name and release of this operating system, (cat /etc/motd).
Print a list of all files in your parent directory.
Print all the processes root is running.
Print the value of the TERM, PATH, and HOME variables.
Print your disk usage (du).
Use the id command to print your group ID.
Print "Please couldn't you loan me $50.00?"
Tell the user "Good bye" and the current hour (see man pages for the date command).
Make sure your script is executable.
chmod +x greetme ...
Get Linux Shells by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.