10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
All,
I have a text file(Inputfile.csv) with millions of rows and 100 columns. Check the sample for 2 columns below.
Key,Check
A,1
A,2
A,
A,4
B,0
B,1
B,2
B,3
B,4
....
million rows.
My requirement is to delete all the rows corresponding to all the keys which ever has at least one... (4 Replies)
Discussion started by: ks_reddy
4 Replies
2. Shell Programming and Scripting
Hello,
I am new to awk and I am trying to figure out how to print an output based on user input.
For example:
ubuntu:~/scripts$ steps="step1, step2, step3"
ubuntu:~/scripts$ echo $steps
step1, step2, step3
I am playing around and I got this pattern that I want:
... (3 Replies)
Discussion started by: tattoostreet
3 Replies
3. Shell Programming and Scripting
Input :
abc def 1 xyz zzz
bca cde 2 yyy xxx
Expected output :
abc def |1 xyz zzz
bca cde |2 yyy xxx
I have tried the command below and losing the number. Any help is greatly appreciated
1. sed 's//|/' num.txt
Result:
abc def | xyz zzz
bca cde |... (7 Replies)
Discussion started by: kbsuryadev
7 Replies
4. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies
5. Shell Programming and Scripting
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have the following input which i want to process using AWK.
Rows,NC,amount
1,1202,0.192387
2,1201,0.111111
3,1201,0.123456
i want the following output
count of rows = 3 ,sum of amount = 0.426954
Many thanks (2 Replies)
Discussion started by: pistachio
2 Replies
7. Shell Programming and Scripting
Hi friends
I have 100 files in my directory. Each file look like this..
Temp1 Temp2 Temp3
MAS 1 2 3
MAS 4 5 6
MAS 7 8 9
Delhi 10 11 12
Delhi 13 14 15
Delhi 16 17 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
8. Shell Programming and Scripting
I need a solution to awk out an unknown column. I am unable to say '{print $x}' because the location changes. I would like to find a perl or awk solution to this. I do not know either very well but am trying to delve deeper into both.
I am looking for the version of pkg8 in this example. Please... (17 Replies)
Discussion started by: i9300
17 Replies
9. Shell Programming and Scripting
Is there a way to tell awk to ignore the first 11 lines of a file?? example, I have a csv file with all the heading information in the first lines. I want to split the file into 5-6 different files but I want to retain the the first 11 lines of the file.
As it is now I run this command:
... (8 Replies)
Discussion started by: trey85stang
8 Replies
10. Shell Programming and Scripting
Hello,
I request your kind help in solving this problem...
I have a file with two columns and "n" number of rows. For the first column, it won't be change. For the second column, I want to take the average of the first three rows. Then assign the averaged value to the first three rows. This... (8 Replies)
Discussion started by: solracq
8 Replies