10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I am trying to write a script to parse the output of data and then alert based on certain conditions
This is the output of my script
(STRING) Name = Joe
(FLOAT64) BMI = 34
(FLOAT64) Weight = 156
(STRING) Name = Sam
(FLOAT64) BMI = 32
(FLOAT64) Weight = 180
and so on it repeats... (4 Replies)
Discussion started by: sidnow
4 Replies
2. UNIX for Dummies Questions & Answers
Hi Help,
I have an I/p, which looks like ---
FF
GG
HH
I want the o/p to be like ---
FF GG HH.
How we can do that?
Thanks (7 Replies)
Discussion started by: Indra2011
7 Replies
3. Shell Programming and Scripting
Hello,
I have a comma seperate metadata as follows:
CITY ,COUNTY,STATE,COUNTRY
NEW_YORK,NYC ,NY ,USA
NEWARK ,ESSEX ,NJ ,USA
CHICAGO ,COOK ,IL ,USA
SEATTLE ,MINER ,WA ,USA
In my process, I get two key values ie
CITY NAME (can be one of the... (7 Replies)
Discussion started by: calredd
7 Replies
4. UNIX for Dummies Questions & Answers
file with this content
awk 'NR==1 {print $4} && NR==2 {print $5}' file
The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am using the following code to change NA to X in only the 5th column of my text file:
awk '{gsub("NA","x",$5)}1' in.file > out.file
How can I modify this code if I want to change NA to X in multiple columns of the text file (i.e. columns 5,6 and 7). Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
6. Shell Programming and Scripting
Hi,
I have a file containing 100,000 rows-by-120 columns and I need to compute for the standard deviation for each row. Any idea on how to calculate row-wise standard deviation using awk? My sample data looks like this:
input data:
23 35 12 25 16 17 18 19 29 12
12 26 15 14 15 23 12 12... (2 Replies)
Discussion started by: ida1215
2 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
8. Shell Programming and Scripting
Hello all, I need to compute a row-wise average of files with a single column based on the pattern of the filenames. I really appreciate any help on this. it would just be very difficult to do them manually as the rows are mounting to 100,000 lines. the filenames are as below with convention as... (2 Replies)
Discussion started by: ida1215
2 Replies
9. Shell Programming and Scripting
I want to get value of last row and 6 column from awk. Below is the format of my file. And RED one is my desired value. Actaully this stats usally update after every 1 hour so i want that every time i run the script i get the latest value.
Ending time - 01:00:58
HOURLY CALL ATTEMPTS... (4 Replies)
Discussion started by: wakhan
4 Replies
10. Shell Programming and Scripting
Hi
I have a file like
a,1
b,2
d,3
a,2
b,3
c,7
Result Desired:
a,3
b,5
d,3
c,7
i.e on the bases of 1st field the addition is done of the 2nd field and result printed out. (3 Replies)
Discussion started by: gauravgoel
3 Replies