Lesson 102

Concepts we covered


First of all, make it so that every time you login to the server, you are greeted by
Create a directory called "homework102" in your home directory. Copy your "info" script from last time into this directory. Rename it to "info.sh". Now change it so that
  1. it only uses variables (i.e. no commands other than echo)
  2. the output contains less linebreaks than last time (compare the output below to last time)
  3. it outputs the contents of the FOOD variable which you set before running the script.
This should be the output:
	Hello world!
I am a script located in the following location: <working directory here>
I am being run by the following user: <username>
I like to eat: <content of FOOD variable>

Now write a script called "moreInfo.sh" that asks you for your name and then outputs the date.
This should be the output
	What is your name?
<enter name here>
Hello, <your name>. Today's date is 2012-04-04.
Create a directory called "scripts" in your home directory. Add the scripts directory to your PATH variable (yes, you can do it!) and make sure it is persistent (in other words, still there after you log in and out again). Create a script called "howMany.sh" which counts the number of  normal and hidden files  in the current directory.
The output should be:
	The number of normal files in this directory is <number of files>
The number of normal plus hidden files is <number of files>