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
moving directories to new directories on multiple servers mackdaddy07 Shell Programming and Scripting 0 04-06-2007 08:30 AM
append 3 users in /etc/passwd melanie_pfefer Shell Programming and Scripting 3 03-23-2007 03:36 AM
SQLplus in Shell scripts trupti_d Shell Programming and Scripting 12 03-16-2007 06:46 AM
Scripts for ID´s free in /etc/passwd oscar_acm Shell Programming and Scripting 2 11-15-2005 09:50 PM
sqlplus and sh scripts (to_char command)) josecollantes UNIX for Advanced & Expert Users 4 09-06-2001 06:59 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 05-08-2007
Registered User
 

Join Date: May 2007
Posts: 27
im not 100% sure i understand.. but you can define a name in the find command too, i.e.

Code:
find . -type f -name "*.sh" -exec grep -l sqlplus.*\@ {} \;
that would look for all files are named *.sh

or, if you did the find, and piped it into a file like so

Code:
find . -type f -name "*.sh" -exec grep -l sqlplus.*\@ {} \; > myfile.txt
then editted myfile.txt, removed all the files you did NOT want to change, then used the myfile.txt in the for/loop... so instead of using

Code:
for file in $(find . -type f -exec grep -l sqlplus.*\@ {} \;); do
use

Code:
for file in $(cat myfile.txt); do
=)
Reply With Quote
Forum Sponsor
  #9  
Old 05-08-2007
Registered User
 

Join Date: Apr 2007
Posts: 15
You're surely right about what am i think about.
by making "myfile.txt", i clearly now and it will be more easy to trackdown files. but you have give me the idea, but i'm quite not confident if it could be used for the whole scripts in this AIX box within many users.

But surely i can figured it out.

thanks again.

Regards,
Helmi
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




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