loop number of records.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting loop number of records.
# 1  
Old 02-16-2008
loop number of records.

Initially i store some files into anothe file Y. Now i want read the contents of file Y one by one do some check on each file.
i,e
Open file Y (contains multiple files)
First read a file , do some check on that individual file.If that file satisfies teh condition put it in another file.
Now read the second file, check, if satisfies put it in another file.
NOw read the third file....
This process continues till all the files in File Y are finished.
How can i solve this.
how can i read one file, do check, then second file, do check...
# 2  
Old 02-16-2008
Please do read the rules of the forum ! Smilie

No duplicate posting

loop records
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

gzcat number of records

Hey guys, I want to do something quite simple but I just can't no matter what I try. I have a large file and i usually just: gzcat test.gz | nohup /test/this-script-does-things-to-the-records.pl -> /testdir/tmp_test.txt But now I need to do it only for the first 100k records. I sure... (7 Replies)
Discussion started by: sg3
7 Replies

2. Shell Programming and Scripting

Compare two files with different number of records and output only the Extra records from file1

Hi Freinds , I have 2 files . File 1 |nag|HYd|1|Che |esw|Gun|2|hyd |pra|bhe|3|hyd |omu|hei|4|bnsj |uer|oeri|5|uery File 2 |nag|HYd|1|Che |esw|Gun|2|hyd |uer|oi|3|uery output : (9 Replies)
Discussion started by: i150371485
9 Replies

3. Shell Programming and Scripting

AWK print number of records, divide this number

I would like to print the number of records of 2 files, and divide the two numbers awk '{print NR}' file1 > output1 awk '{print NR}' file2 > output2 paste output1 output2 > output awl '{print $1/$2}' output > output_2 is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies

4. Shell Programming and Scripting

Getting number of records from a table

I am doing a loading process. I am loading data from a Oracle source to Oracle target. For example there is an SQL statement: Insert into emp_1 Select * from emp_2 where deptno=20; In this case my source is emp_2 and loading into my target table emp_1. This process is automated. Now I... (3 Replies)
Discussion started by: karthikkasarla
3 Replies

5. Shell Programming and Scripting

Number of records in a file of a particular directory

Hi All, I want to find the number of records in a file of a particular directory I have a file as abcd.txt in the path var/hr/payments/ I want to find number of records in abcd.txt file in a single command. I tried the following cd /var/hr/payments/wc -l abcd.txt I got... (5 Replies)
Discussion started by: ajaykumarkona
5 Replies

6. Shell Programming and Scripting

loop going beyond records

sql1="select date_type, offset, mail_list, reminder_offset from osr_cbb_offset_dates" $JAVA icoredp.tools.oracleUnload -c ${CSORDHOME}/conf -s "$sql1" >> ${output} NO_OF_REC=`wc -l ${output}| cut -c1-9` echo "Records in first sql $NO_OF_REC" cut -f1 $output| while read LINE1 i=0; do echo... (1 Reply)
Discussion started by: priyanka3006
1 Replies

7. AIX

loop records

Initially i store some files into anothe file Y. Now i want read the contents of file Y one by one do some check on each file. i,e Open file Y (contains multiple files) First read a file , do some check on that individual file.If that file satisfies teh condition put it in another file. Now... (1 Reply)
Discussion started by: vasuarjula
1 Replies

8. UNIX for Advanced & Expert Users

delete records using line number(NR)

Hai I have a flat file which contains more than 6 crore lines or records. I want to delete only one line, using line number. For example I want to delete 414556 th line . How to do this using sed or awk command. thanks (3 Replies)
Discussion started by: tkbharani
3 Replies

9. Shell Programming and Scripting

awk - Number of records

Hi, Is it possible to find the total number of records processed by awk at begining. NR gives the value at the end. Is there any variable available to find the value at the begining? Thanks ---------- Suman (1 Reply)
Discussion started by: suman_jakkula
1 Replies

10. Shell Programming and Scripting

Number of records in a file

hi gurus i'm trying to get the count of number of records of a file as : wc -l file1.txt iam getting the correct count by in out put i'm getting the file name too i get the output as follows "7 file1.txt" my question is how to avoid filename in the output. might be a basic... (20 Replies)
Discussion started by: sish78
20 Replies
Login or Register to Ask a Question