10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a csv file as shown below,
xop_thy 80 avr_njk 50 str_nyu 60
avr_irt 70 str_nhj 60 avr_ngt 50
str_tgt 80 xop_nmg 50 xop_nth 40
cyv_gty 40 cop_thl 40 vir_tyk 80
vir_plo 20 vir_thk 40 ijk_yuc 70
cop_thy 70 ijk_yuc 80 irt_hgt 80
I need to align/sort the csv file based... (7 Replies)
Discussion started by: dineshkumarsrk
7 Replies
2. Shell Programming and Scripting
Hello All,
I have a file which have content as below.
03/09/2014 10:35 AM 618 Admin\rick pqr_ klm2_pog12_20140309_c.xlsx
03/10/2014 10:35 AM 618 user\test01 mplz_ fgh2_lal12_20140310_c.xlsx
03/17/2014 10:35 AM 618 Admin\vick abc_ xyz2_bc12_20140317_c.xlsx
03/18/2014 ... (2 Replies)
Discussion started by: kumar30213
2 Replies
3. Shell Programming and Scripting
Hi,
I have a file where data is pipe separated.First i want to sort the file content by date . Then i want to pick up the records based on the first column which should be unique and not have duplicates.
NYSE|yyyrrrddd|toronto|isin|ticker|2013-05-15... (2 Replies)
Discussion started by: samrat dutta
2 Replies
4. Shell Programming and Scripting
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Discussion started by: ckmehta
3 Replies
5. Shell Programming and Scripting
Hello ,
i have a text file like this
1 a1 ,AB ,AC ;AD ,EE
2 a2 ,WE ;TR ,YT ,WW
3 a3 ;AS ,UY ;RF ,YT
i want to sort this text file based on each row , and excluding 2nd column from the sorting and not taking the comma or ; into consideration in the sorting, so it will become like this... (12 Replies)
Discussion started by: shelladdict
12 Replies
6. Shell Programming and Scripting
Hello all,
this should really be easy for you... I need AWK to print column maxima for each column of such input:
Input:
1 2 3 1
2 1 1 3
2 1 1 2
Output should be:
2 2 3 3
This does the sum, but i need max instead:
{ for(i=1; i<=NF; i++)
sum +=$i }
END {for(i=1; i in sum;... (3 Replies)
Discussion started by: irrevocabile
3 Replies
7. Shell Programming and Scripting
Hello,
I've done
ls -ls >fileout1
When I do the sort command for +4 it sorts it bu group. When I do +5 it sorts it by date. But it's skipping the file size column. Example:
rwxr-xr-x 1 Grueben sup 65 16 Sep 13:58 cdee
How can I sort it by file size? It doesn't... (2 Replies)
Discussion started by: Grueben
2 Replies
8. Shell Programming and Scripting
Hi,
My input file is
$cat samp
1 siva
1 raja
2 siva
1 siva
2 raja
4 venkat
i want sort this name wise...alos need to remove duplicate lines.
i am using
cat samp|awk '{print $2,$1}'|sort -u
it showing
raja 1 (3 Replies)
Discussion started by: rsivasan
3 Replies
9. Shell Programming and Scripting
Dear All,
Good day. Here i am facing some problem like below.
file contains
12345 0001 090112
14385 0001 090112
13255 0001 090112
11345 0001 090112
....
I want to sort ascending according to the first column. What will be the shell script. (4 Replies)
Discussion started by: saifurshaon
4 Replies
10. Shell Programming and Scripting
I have to send a file to mainframe and before sending it, I have to execute the quote command to set the record length.
Since the file is dynamic, I do not know what the maximum size of a line could be.
Currently, I use the following function to get the Max Column Count. Since I use "sed" it... (2 Replies)
Discussion started by: gemini
2 Replies