![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|