Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I dont like to take up people's time but I have taken the below shell scripts as far as I can. I dont think I am capable of any more, and I guess I hate to say it but I need help. Thanks in advance for any assistance anyone can provide. Sorry to be burdonsome. PS: These have been written in vi text editor.
Write a shell script that will greet you with “Good Morning” if the time is between 12.00am to 11.59am, “Good Afternoon” if the time is between 12.00pm to 4.59pm, “Good Evening” if the time is between 5.00pm to 7.59pm and “Good Night” if it is between 8.00pm to 11.59pm.
greet=`date | cut –c12-13,15-16`;
if [ “$greet” => “0000” –a “$greet” <= “1159” ];
echo “Good Morning!”;
if [ “$greet” => “1200” –a “$greet” <= “1659” ];
echo “Good Afternoon!”;
if [ “$greet” => “1700” –a “$greet” <= “1959” ];
echo “Good Evening”;
echo “Good Night”
Write a shell script which will display a menu as follows and accepts an input key from the user to execute an option on the menu.
1) Display today’s date and system uptime
2) Display calendar for a particular month and year
3) Display current logon users
4) Find a file
5) Exit from menu
Please enter your choice (1-5):
For option 2 the user must be allowed to enter the month and the year for calendar display. For option 4 you must use the find command to find the file and the user must be allowed to enter the filename and the name of the directory for the search. Your shell script should run continuously until the user enters 5 for exit.
tput cup 3 17; echo “My Menu”;
tput cup 4 17; echo “~~~~~~~”;
tput cup 6 12; echo “1) Display today’s date and system uptime”;
tput cup 7 12; echo “2) Display calendar for a particular month and year”;
tput cup 8 12; echo “3) Display current logon users”;
tput cup 9 12; echo “4) Find a file”;
tput cup 10 12; echo “5) Exit from menu”;
tput cup 11 17; echo “Please enter your choice (1-5):”; tput cup 11 49;
if [ “$choice” = “1” ];
tput cup 12 17; date
if [ “$choice” = “2” ];
tput cup 12 17; echo “Please enter month:”; tput cup 12 37;
tput cup 13 17; echo “Please enter year:”; tput cup 13 37;
if [ “$choice” = “3” ];
tput cup 12 17; who
if [ “$choice” = “4” ];
tput cup 12 17; echo “What is the name of the directory?”; tput cup 12 52;
tput cup 13 17; echo “What is the filename?”; tput cup 13 52;
tput cup 14 17; find /directory –name filename
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.