10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Experts,
I have input file which is comma separated, has 4 columns like below,
BRAND,COUNTRY,MODEL,COUNT
NIKE,USA,DUMMY,5
NIKE,USA,ORIGINAL,10
PUMA,FRANCE,DUMMY,20
PUMA,FRANCE,ORIGINAL,15
ADIDAS,ITALY,DUMMY,50
ADIDAS,ITALY,ORIGINAL,50
SPIKE,CHINA,DUMMY,1O
And expected output add... (2 Replies)
Discussion started by: ricky1991
2 Replies
2. Shell Programming and Scripting
HI All,
I'm embedding SQL query in Script which gives following output:
Assignee Group Total
ABC Group1 17
PQR Group2 5
PQR Group3 6
XYZ Group1 10
XYZ Group3 5
I have saved the above output in a file.
How do i sum up the contents of this output so as to get following output:
... (4 Replies)
Discussion started by: Khushbu
4 Replies
3. Shell Programming and Scripting
Hi,
I need to display output in below format
Customer : Apr 24 16:31 Customer_Name_111121.txt
|---Space---|Apr 24 16:32 Customer_Name _111121. txt
|---Space---|Apr 24 16:34 Customer_Name_111112. txt
|---Space---|Apr 24 16:35 Customer_Name _222223. txt
|---Space---|Apr 24 16:37... (8 Replies)
Discussion started by: ketanraut
8 Replies
4. Shell Programming and Scripting
My File looks like:
"|" -> Field separator
A|B|C|100|1000
D|E|F|1|2
G|H|I|0|7
D|E|F|1|2
A|B|C|10|10000
G|H|I|0|7
A|B|C|1|100
D|E|F|1|2
I need to do a SUM on Col. 5 and Col.6 by grouping on Col 1,2 & 3
My expected output is:
A|B|C|111|11100 (2 Replies)
Discussion started by: machomaddy
2 Replies
5. Shell Programming and Scripting
Hi all, I know this sounds suspiciously like a homework course; but, it is not.
My goal is to take a file, and match my "ID" column to the "Date" column, if those conditions are true, add the total number of minutes worked and place it in this file, while not printing the original rows that I... (6 Replies)
Discussion started by: mtucker6784
6 Replies
6. Shell Programming and Scripting
Hello all, I've got a script that collects data on file systems and prints out specific data about each. I've formatted headers w/ printf like so.
printf "\033
and I had the content of the varibles printed out beneath those columns like so:
printf... (5 Replies)
Discussion started by: awreneau
5 Replies
7. Shell Programming and Scripting
I have a list of values ( in Kb) I have the following code to sum up the values and convert the total to GB
cat list
701368101370
101370101370
801554101370
701636101370
101757101370
101876101370
901951101370
And this is the output of my script
awk '{ s += $1 } END {... (3 Replies)
Discussion started by: Sara_84
3 Replies
8. UNIX for Dummies Questions & Answers
If I have say 4 files like this:
File1:
1 3 4
7 7 0
5 7 5
9 1 2
7 4 8
File2:
1 4 6
2 5 7
1 2 3
6 0 3
0 3 8
File3: (5 Replies)
Discussion started by: cosmologist
5 Replies
9. Shell Programming and Scripting
Hi All,
happy new year.
I have a file with 4xN columns like
0.0000e+00 0.0000e+00 7.199E+07 7.123E+07 6.976E+07 6.482E+07 5.256E+07 2.523E+07
0.0000e+00 0.0000e+00 8.641E+07 8.550E+07 8.373E+07 7.780E+07 6.309E+07 3.028E+07... (8 Replies)
Discussion started by: f_o_555
8 Replies
10. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies