Korne Shell Script... - Unix

This is a discussion on Korne Shell Script... - Unix ; I am trying to write a Korne Shell Script, wherein the user is prompted for a date and a directory. and then it starts searching recursively in this directory the list of all the files modified after the date chosen. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Korne Shell Script...

  1. Korne Shell Script...

    I am trying to write a Korne Shell Script, wherein the user is
    prompted for a date and a directory.
    and then it starts searching recursively in this directory the list of
    all the files modified after the date chosen.

    I wrote the following Script but it seems to be not working :-

    #!/usr/bin/ksh
    typeset DATE=`date +%d%m%y`
    echo "Enter a date (DDMMYY) and a directory.."
    read files
    Find "$dir' -type f -name -mtime "$files"

    Anyone, please let me know the correct way.

    Thanks in advance.

  2. Re: Korne Shell Script...

    schrieb im Newsbeitrag
    news:0447955e-2190-4c17-bfb9-50602f897246@a35g2000prf.googlegroups.com...
    >I am trying to write a Korne Shell Script, wherein the user is
    > prompted for a date and a directory.
    > and then it starts searching recursively in this directory the list of
    > all the files modified after the date chosen.
    >
    > I wrote the following Script but it seems to be not working :-
    >
    > #!/usr/bin/ksh
    > typeset DATE=`date +%d%m%y`
    > echo "Enter a date (DDMMYY) and a directory.."
    > read files

    read files dir

    > Find "$dir' -type f -name -mtime "$files"

    find "$dir" -type f -mtime -"$files" -print

    >
    > Anyone, please let me know the correct way.
    >
    > Thanks in advance.

    Bye, Jojo



  3. Re: Korne Shell Script...

    On 2007-12-06, kirankumar.techy@gmail.com wrote:
    > I am trying to write a Korne Shell Script, wherein the user is
    > prompted for a date and a directory.
    > and then it starts searching recursively in this directory the list of
    > all the files modified after the date chosen.
    >
    > I wrote the following Script but it seems to be not working :-


    Tip: Instead of saying "it seems to be not working", describe precisely
    what is going wrong and include any error output that results from
    running your script. You're much more likely to get helpful responses
    if you do this.

    > #!/usr/bin/ksh
    > typeset DATE=`date +%d%m%y`
    > echo "Enter a date (DDMMYY) and a directory.."
    > read files


    Where did you set $dir?

    > Find "$dir' -type f -name -mtime "$files"


    Find -> find

    (Almost all, [probably all] UNIX commands are completely lower case.)

    After that, you need to fix the rest of your find command. Error
    messages you get running the script might give you some hints.

    Good luck.

    --


+ Reply to Thread