Thread: UNIX script

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    2

    UNIX script

    CAN SOMEONE PLEASE HELP!!!!!!!!

    Create a KORN shell UNIX utility called search. This utility will be able to do following:
    Recursively search for files using file expansion characters
    Recursively search for files using regular expressions
    Syntax of a command line for this utility:
    search option(s) pattern directory [filename]

    Valid options are:
    -f - use file expansion
    -r - use regular expressions
    -i - ignore (do not show) errors due to access permissions

    Please note, that the -i option can be combined with the -f option and your utility should be able to process such case correctly. If the -i option will be used with conjunction with the -r option an error should be generated.

    Pattern will treated as file expansion or regular expression based on specified option.
    Directory specified will be the topmost directory where the search will be performed.
    If the optional file name is specified output should be sent to it instead to standard output (which is default).

    Any other option should result in an error message.
    Make sure, that your script is well documented.

    Valid options for your scripts are:

    -f
    -fi
    -if
    -r
    Any other options (including -ri and -ir) should generate an error.

  2. #2
    bigbob
    Guest

    hmmm.

    I'm assuming that you mean a Korn shell script. You should try using `grep` & `find`, unless the assignment explicitly forbids doing so.

  3. #3
    phubuh
    Guest
    Assignments are made for making.
    If you had done ANYTHING at all, we could help you debug.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 12:27 AM
  2. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 01:47 PM
  3. Running 'exec' twice in one UNIX shell script
    By Zughiaq in forum Tech Board
    Replies: 2
    Last Post: 05-03-2003, 12:04 AM
  4. AIX unix system script (need help)
    By Liam Battle in forum Linux Programming
    Replies: 4
    Last Post: 02-10-2002, 05:34 PM
  5. Replies: 0
    Last Post: 09-14-2001, 01:46 AM