Korne Shell Problem.

Hi Everyone,

I have tried with the following Code for each of the following, but that does not seem to serve the purpose. Can someone give some pointers please.

1) A Korne Shell which asks the user to enter the name of a file when searching it
recursively (using the find command) in the home directory of this user.

#!/usr/bin/ksh
find * -type f -type d -path usr
if [ -a file ]
then
echo -n "Enter the file name"
fi

2) A Korne Shell which asks the user for a date (format AAMMJJ) and a directory and
then searches recursively in this directory the list of files modified after the date
chosen.

#!/usr/bin/ksh
if ['-d $1'+ 'date -t "%AA%MM%JJ"']
then
echo -n "find all files modified after the chosen date"
touch ' new date -nt "%AA%MM%JJ"
find * -type f -type new date

Thanks,
Marconi.

see Simple rules of the UNIX.COM forums:

#4 & #6

Hi,

Pls have a look at what I posted clearly.
I have asked for some pointers after trying it and not the actual code.

Thanks,
Marc

That looks awful.

I thought you would be doing...

...
echo "Enter filename...."
read WANTED
find "$HOME" -type f -name "$WANTED"

The first argument to find should be directory to search in, the wildcard is a blunderbuss that will pickup all kinds of debris.