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

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need some help...can any body give some idea
# 8  
Old 02-23-2008
yes it will, as find looks in all subfolders
# 9  
Old 02-23-2008
need some help..can any body give me some idea..

James can you give me some more idea...

instead of this syntax , is possible if will run a script which will give me the same result...

If i will go for a small script should i need to give any condition or if you can give me the script idea then thanks again...
# 10  
Old 02-23-2008
what exactly do you want to do?

do you want to write the information about all .txt files under XYZ, and write this all out to ONE output file? Or do you want separate output files?

If you want one output file, what is wrong with the command I gave you? It finds all .txt files and displays the information about them you want.

you have to be more specific what you need a script for
# 11  
Old 02-23-2008
need some help..can any body give me some idea..

1.i have the main folder XYZ.
2.Many folders inside xyz say abc,def,mno
3.And inside each folder, i have files .

want a script that will run and check the abc,def,mno in xyz and pick what ever todays file and print that in output file.out put file should be in xyz.

instead of the syntax if i will go for a script and can make a corn entry for that then will get the result automatically..
# 12  
Old 02-23-2008
need some help..can any body give me some idea..

James ...

culd you please give some idea on this....
# 13  
Old 02-23-2008
you might have to change some values around depending on your system


set ddmmm=`date | awk '{print $2, $3}'` #this will get say "Feb 23"
find XYZ -type f -name '*.txt' | grep "$ddmmm" | xargs ls -l | awk '{print $8 , $9}' #grep for todays date...this will still pick up a file from last year (i.e. Feb 23 2007) so if you have files a year older, maybe you could do another grep -v 2007 after grep "$ddmmm"

# 14  
Old 02-23-2008
need some help..can any body give me some idea..

many thanks James for you help and valuable suggestion and your reply..

many thanks....
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk idea

Hello everybody, I am new here as well as in scripting. I need some help. I have log files that are boring to examine. I wanted to use awk to do this: -get the lines that match the eight field (user mac address) -now sort them according to date (first 2 fields) -print the following: ... (4 Replies)
Discussion started by: anaABB
4 Replies

2. Programming

Would you please give me some idea about single client and multiple servers

Hi, I have a program which needs to connect multiple servers at the same time. The program has to collect data from each of servers and then make a decision regarding to the data received. There are several requirements. 1. Server (s) may shutdown anytime without any ack (e.g.power... (1 Reply)
Discussion started by: sehang
1 Replies

3. Shell Programming and Scripting

Can any body give me a solution to 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"... (9 Replies)
Discussion started by: sapan123
9 Replies

4. Shell Programming and Scripting

help... no idea what to use

my issue now is i have a txt file containing a list like below i want to create a script that will add a constant text "Find this name" at the start and "at your directory" at the end. every line should be added by phrase at the start and end. Each line of the file should look like "Find... (4 Replies)
Discussion started by: dakid
4 Replies

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

6. Shell Programming and Scripting

Here is an interesting idea...

Does anyone know how to test if an ethernet interface is alive, or accepting connections? Here is the scenario - I have rsc and sc console interfaces on some Suns. There are some sporadic vulnerability scans that send them out to lunch when they run the scans. I have to login to the host and reset... (0 Replies)
Discussion started by: lm_admin_dh
0 Replies

7. Shell Programming and Scripting

any good idea on this?

txt file like this, 1 2 3 4456 a bb c d 3 f e 1 k 32 d m f e 123 m 2 k every line contains 3 or more columns, all the columns are separated by space, and every column includes 1 to 3 character. what I wanna do is deleting the first three columns, and keep the rest no matter how long... (7 Replies)
Discussion started by: fedora
7 Replies

8. Shell Programming and Scripting

Limitations of awk? Good idea? Bad idea?

Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts.. I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Discussion started by: yongho
2 Replies
Login or Register to Ask a Question