10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How does one assign a variable, x to equal the number of records in a different file.
I have a simple command such as below:
awk -F "\t" '(NR>5) { if(($x == "0/0")) { print $0} }' a.txt > a1.txt
but I want x to equal the number of records in a different file, b.txt (10 Replies)
Discussion started by: Geneanalyst
10 Replies
2. Shell Programming and Scripting
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
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
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
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
Hi,
I have CSV file which looks like below, i want to calulate number of records for each brand say SOLO_UNBEATABLE E and SOLO_UNBEATABLE F combined and record count is say 20 . i want to calculate for each brand, and here only first record will have all data and rest of record for the brand... (2 Replies)
Discussion started by: raghavendra.cse
2 Replies
7. Shell Programming and Scripting
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
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
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
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