The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Can any body give me a solution to this... sapan123 Shell Programming and Scripting 9 07-16-2008 03:02 AM
Can any body tell me. sackNumchai Linux 3 05-06-2008 01:28 AM
need some help...can any body give some idea sapan123 Shell Programming and Scripting 13 02-23-2008 03:19 PM
MAILX Body containing SQL results dstinsman UNIX for Dummies Questions & Answers 2 10-06-2006 12:12 AM
How to send body in a mail rajendragora UNIX for Dummies Questions & Answers 6 06-30-2006 03:51 AM

Closed Thread
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
  #1 (permalink)  
Old 07-15-2008
sapan123 sapan123 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 39
can any body help me out on this...

Hi friends..
I am using the below command to search few files from many folders which is under one folder..

i mean let say the path is A/B/C...and inside C...i have 1-10 folder...

the below command is working fine....

for i in 1 3 5 7; do
find /A/B/C/${i} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" |xargs ls -ltr |awk '{print $8 ,$9}' >> ${i}.txt
done

this will give me the result from the folder 1 3 5 7 ,from 1-10 which is inside A/B/C[/b] and print the file having the above extension into 1.txt , 3.txt , 5.txt , 7.txt etc inside /A/B/C

Help needed..

i need some help so that my syntax will search the file only from folder 1,3,5,7 from the 10 folder A/B/C and the out put from these 4 folder will be display in the single file i.e result.txt....not in different folder.

the above 1,3,5,7 folders are inside A/B/C
  #2 (permalink)  
Old 07-15-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,575
I have a great feeling of "deja vu" its maybe time for me to have supper and go to bed...

can you please help me out on this...
Can any body give me a solution to this...

Did you know there were rules out there e.g:

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.
  #3 (permalink)  
Old 07-15-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,312
Quote:
Originally Posted by vbe View Post
I have a great feeling of "deja vu" its maybe time for me to have supper and go to bed...

can you please help me out on this...
Can any body give me a solution to this...

Did you know there were rules out there e.g:

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.
Thread closed.
Closed Thread

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:19 PM.


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