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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"find command" to find the files in the current directories but not in the "subdir" swamymns Shell Programming and Scripting 9 07-22-2008 08:23 AM
grep to find content in between curly braces, "{" and "}," keshav_rk Shell Programming and Scripting 4 08-09-2007 07:14 PM
How to get Find command work with a variable passing "*" value? unxuser Shell Programming and Scripting 5 08-16-2006 07:47 AM
How to find out the exact year in "Last modified time" using ls command Dophlinne UNIX for Dummies Questions & Answers 6 04-11-2006 08:07 AM
What is "escape sequence" in tcsh on Solaris modemer UNIX for Advanced & Expert Users 2 02-15-2005 02:00 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-21-2005
Registered User
 

Join Date: Aug 2005
Posts: 229
How to combine "find" command in for each loop (tcsh)

Hello
I was wandering if I can combine find command in side for each loop in unix
the main propose is to change some thing in files from several types and not all of them
is this possible ? (on liner script? )

tnx for the helppers
Reply With Quote
Forum Sponsor
  #2  
Old 08-22-2005
RishiPahuja's Avatar
Registered User
 

Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
Thumbs up

#!/usr/bin/ksh
for i in `find $PATH your filter conditions`
do
.... do whatever you want to do with $i
done
Reply With Quote
  #3  
Old 08-22-2005
RishiPahuja's Avatar
Registered User
 

Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
Thumbs up

I m giving an example for ksh. As such no idea of tcsh should work to my belief.


#!/usr/bin/ksh
for i in `find $PATH filter conditions`
do
....
do whatever you want with $i
done


regards,
Rishi
Reply With Quote
  #4  
Old 08-22-2005
Registered User
 

Join Date: Aug 2005
Posts: 229
Tnx allot folks
but can someone please help me with do it in tcsh ?
and how can i make it one liner script ?
thanks allot
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:14 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