help me


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help me
# 1  
Old 06-04-2009
help me

I am a student......please help me out on the below given programs





1.Use the echo command to display the line

UNIX is fun to learn

Redirect the displayed line to a file. Append the outputs of the commands to show the users logged into your system, your login account and the current date in the dd-mm-yyyy format to the file.


2.Assuming you have a directory containing the following files:
sprite, cola, choco, orange, book, lemon, lotus, apple

use the ls command to list only those files that
a) consist of four letters
b) begin with the letter c
c) end with the letter e
d) have the second letter o

3.For a file named myfile in the working directory, do the following:

a) give everyone permission to read myfile. No other privilege is to be changed
b) allow the owner and group members to read and write the file. All privileges are
to be removed for everyone else.
c) remove write privileges from everyone except the owner
d) allow the owner and group members to execute myfile and give only the owner
permission to read or write to it.

4.For a directory my folder in your working directory, do the following:

a) Allow everyone to list files in my folder. No other privileges are to be changed.
b) Allow the owner to and group members to list, remove or add files. All privileges
are to be removed from everyone else.
c) Give write privileges to everyone except the owner
d) Allow the owner and group members to execute my folder. Only the owner gets
read or write permission.

5.Put a long-running process in the background and check the accuracy of the sleep command.

6.The ls command with the -R option lists the files in the specified directory and also subdirectories, if any. Use this with a suitable pip-and-filter arrangement to determine whether a file exists in the account logged in.

7.Write an interactive shell using I/O redirection to accept input from file1, put stdout in file2 and stderr in file3.
8.Write a shell program to extract and sort all the users in the file system. Use the /etc/passwd file as input.


9.Write a shell program to translate the /etc/passwd file into uppercase and translate the “:” delimiter into tab characters.

10.Write a shell program using if-the-else to test whether a variable name is a directory or a file.

11.Write a shell program in which an infinite loop prompts a user for file names to be removed and remove the files. Use trap to exit when finished.

12.Write a background command to edit all the files in the directory replacing the word while with until.

13.Write a shell program to test for arguments arg1, arg2 and arg3. If they are not present, prompt the user for them.

14.Write a shell program that adds the integers 1 to 100 and displays the result with a suitable message.

15.Using awk, sum the file sizes in your working directory and print the results.

16.Using a case statement, write a shell program to read a command (eg., who, cal, ls, ps) from the user and execute it.
# 2  
Old 06-04-2009
Homework is not permitted at The UNIX and Linux Forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

Thread closed.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question