The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-02-2008
Docholiday8403 Docholiday8403 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 1
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0