UNIX script

This is a discussion on UNIX script within the Linux Programming forums, part of the Platform Specific Boards category; CAN SOMEONE PLEASE HELP!!!!!!!! Create a KORN shell UNIX utility called search. This utility will be able to do following: ...

  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, 04:34 PM
  5. Replies: 0
    Last Post: 09-14-2001, 01:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21