Desprately Need Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Desprately Need Help
# 1  
Old 04-02-2008
Desprately Need Help

Hi I am new to the forum and I am in need of some major help. For my unix class I have to create a Bourne shell script that:

1. Prompts the user for three items:

a file name pattern
a date in the form mm dd yyyy and
a flag (1 = newer, 2 = older, 3 = same as)

2. List all files in the current directory that
match the pattern and
are newer (or older or same) as the the given date.

The code below is as far as I have gotten.
.................................................................................................... .....
#! usr/bin/sh

echo Please enter a search pattern
read search

echo Please enter a month in the form of mm
read month

echo Please enter a day in the form of dd
read day

echo Please enter a year in the form of yyyy
read year

echo Please enter a flag
echo enter 1 for newer than
echo enter 2 for older than
echo enter 3 for same as

read flag

exec $search > /tmp/jsharloc
.................................................................................................... ..

After I get past part 1 I am lost.

I have been working on this for several hours and I am getting no where if there is someone that could help me out with the code I would greatly appreciate it.

Last edited by Docholiday8403; 04-02-2008 at 12:40 AM..
# 2  
Old 04-02-2008
Homework Violation
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question