I will be straight with everyone. I am in college and I have a basic unix/linux class, we were given a scripting assignment that I have been struggling with. We had about 15 scripts to write in all, I still have 6 to do, and they are due tomorrow. I turned here as a last result.
Alot of these might seem simple to you guys and gals, but I have never been exposed to linux/unix until now and I have had very little programming experience.
I will be running these scripts in Sun Solaris 9, if that makes a difference. Also I am to be using the VI editor...
The scripts I need follow:
1.Write a script called welcome to display the following information at login.
Last login: Wed Mar 3 10:32:22 on tty1
Last logoff: Wed Mar 3 10:33:17 EST 2004
xuser, welcome to localhost.localdomain.
Current date: Wed Mar 3 10:33:22 EST 2004
shell prompt>
2.Write a script called lsh that displays a message to the user that the hidden files will be displayed and then display the hidden files with multiple files per line.
3.Write a script called lsx that displays a message to the user that the executable files will be displayed and then displays the executable files in the order in which they were last modified.
4.Write a pair of scripts that will count the occurrence of each letter in a file.
a)The first script should display the results sorted by frequency of occurrence.
b)The second script should display the results sorted alphabetically.
5.Write a pair of scripts that will allow you to encrypt and decrypt files.
a)The encrypt script should have the form encrypt filename letter where filename is the name of the file to be encrypted and letter is a letter that will tell the script how to replace the letters in the file. For example, if letter is a 'c', then the a's are replaced by c's, the b's are replaced by d's, ... the y's are replaced by a's and the z's are replaced by b's.
b)The decrypt script should have the dorm decrypt filename letter where filename is the name of the file to be decrypted and letter is the letter that was used to encrypt the file.
6.Write a script to create the home directories for new users.
Any help will be greatly appreciated. Thanks in advance.