LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   I have some scripts that I need to write.... (https://www.linuxquestions.org/questions/programming-9/i-have-some-scripts-that-i-need-to-write-262933/)

Meekal 12-05-2004 03:30 PM

I have some scripts that I need to write....
 
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.
:study:

trickykid 12-05-2004 04:02 PM

We are not here to do your homework for you. You should have started your work a little sooner than waiting til the last minute, or at least seeked advice if you wrote a script that doesn't work. But don't ask others to do your homework, that's cheating.

I'm closing this thread, if you have a problem with our Rules, email me or the site admin. I'm sure your Professor would not be happy your trying to get others to write your own scripts that you should have done yourself.

Regards.

acid_kewpie 12-05-2004 04:03 PM

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.

http://www.linuxquestions.org/rules.php

also we do not like people trying to get other people to do their work for them... you will learn nothing this way.


All times are GMT -5. The time now is 09:34 AM.