The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting input files into multiple files through AWK command arund_01 Shell Programming and Scripting 3 05-13-2008 06:17 AM
Help-prompt for path and take this as input in find command bsandeep_80 UNIX for Advanced & Expert Users 6 01-03-2008 04:16 AM
Little bit weired : Find files in UNIX w/o using find or where command jatin.jain Shell Programming and Scripting 10 09-19-2007 03:47 AM
Script to find files on a given input date ar.karan Shell Programming and Scripting 1 08-13-2007 07:07 PM
pass input arguements to DB2 SQL script mpang_ Shell Programming and Scripting 0 12-12-2006 08:27 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-18-2001
Registered User
 

Join Date: Jul 2001
Posts: 1
Question find files and using them as input arguements for another command

I need to do the following:
1) find files in certain directories that have todays date stamp
2) use these files as input arguements into another command
Forum Sponsor
  #2  
Old 07-18-2001
alwayslearningunix
Guest
 

Posts: n/a
Use the touch command with the -t flag to touch a file with the date you need to search FROM, then use the find command with the -newer argument to locate files which are newer than the file you touched.

You can enter the files found into a variable this:

FILES=`find . -type f -newer [touched_file] {} \;

Then use the files in that variable one by in a for loop that holds whatever command you wish to operate on them

i.e.

for x in $FILES
do
[command(s)]
done

Regards.

Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0