Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Can anyone help?  (Read 4146 times)

0 Members and 1 Guest are viewing this topic.

lennondhino

  • Guest
Can anyone help?
« on: May 06, 2007, 02:57:50 PM »
Hey im trying to teach myself linux but am finding it difficult, came across some questions that i should be able to do, but cant.

can anyone know the answers or able to give me hints or where to look for the answers?



A Write a Bourne shell script that eliminates the dangers associated with rm. Use the following specification:

NAME
Del – delete a file interactively

SYNOPSIS
Del filename

DESCRIPTION
This is the outline for del:
Select sh
Get the filename from the command line ($1)
If there is no file with that name
   Print an error message

Otherwise
   Ask if the user wants to delete the file
   Read the users choice (y/n)
   If the choice is yes (y)
      Remove the file and print a message
Otherwise
      Print a message


B Give separate grep commands to select all lines in the file emp.lst which  (i) begin with the digit 2 and (ii) end with a number between 70000 and 89999. Show how you would extend the ls command with grep in order to locate all files in the current directory which are themselves directories.

C Give an egrep command which selects lines containing Wilcox , wilcocks, woodhouse or woodcock in the file emp.lst. Give an egrep command to select lines containing Truman or trueman in emp.lst

GX1_Man

  • Guest
Re: Can anyone help?
« Reply #1 on: May 06, 2007, 08:41:27 PM »
This sounds like homework and we don't do that for you here.

www.homeworkhope.com

Or do some reading on the Linux forums - www.linuxquestions.org