Can any body give me a solution to this...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can any body give me a solution to this...
# 8  
Old 07-15-2008
What is the output with?

Code:
for i in 1 3 5 7; do
  find /A/B/C/${i} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" 
done

# 9  
Old 07-16-2008
thanks danmero..Frank many thanks....

for i in `ls {1,3,5,7}/*.{txt,TXT,dat,csv} 2>/dev/null`;do echo ${i#*/} >> results.txt;done
--------------------------------------------------------------------------------

but it will not find from all the folder....
# 10  
Old 07-16-2008
.. awk -F'/' '{print $NF}' ....

i didnt get this...
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. What is on Your Mind?

How to encourage emerging users in forum to give better solution:?

Our moderators/admins/users are doing great job by sharing knowledge with each other, they do correct/appreciate us in posts. This poll is to encourage emerging users to go in a better direction, kindly do give your thoughts on same. 1- Giving them a reward/appreciation if they are... (31 Replies)
Discussion started by: RavinderSingh13
31 Replies

2. Shell Programming and Scripting

Mail with body

Hello All, I wish to mail after completion of code. I would like to include subject and body in it. I am not looking to read the body from other file but willing to provide the body in the command itself. Can i do this way? I am looking to pass some parameters to body and this will be possible... (1 Reply)
Discussion started by: forums123456
1 Replies

3. UNIX for Dummies Questions & Answers

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"... (2 Replies)
Discussion started by: sapan123
2 Replies

4. Linux

Can any body tell me.

:(I want to install linux (SLES-9-SP4-CD-x86_64-GM-CD1) but it doesnot work. It said the computer is 32 bits you cannot use 64 bits on it. (3 Replies)
Discussion started by: sackNumchai
3 Replies

5. Shell Programming and Scripting

need some help...can any body give some idea

Hi i need some help... 1.i have one main folder XYZ. 2.Many folders inside xyz say abc,def,mno 3.And inside each folder, i have many files . want to print what ever files are present inside the subfolder abc,def,mno (what ever todays file ) in output file.out put file should be in xyz(say... (13 Replies)
Discussion started by: sapan123
13 Replies

6. UNIX for Advanced & Expert Users

can any body give some idea on this..

create one script That reads a file <file> Each line of <file> file contains just an account The run the grep command like below /usr/xpg4/bin/grep -E -e 'ACCOUNT.*' < File> > <OUTPUT FILE> (1 Reply)
Discussion started by: sapan123
1 Replies
Login or Register to Ask a Question