Hello,
I have a file which has the following format: I have to do is sort individual records in the file based on the 4th field. Each record starts with "Module". Is there an easy way to do this using awk. I have tried piping output from awk to sort and also using "sort" inside awk but what happens is that the sorting happens for the entire file and the record-wise structure is compromised. Any suggestion is welcome.
Hi, I have used the following code to sort two sets of data:
awk '{printf "%10s %s\n",$1,$2}'
The first column is text and the second involves numbers. I was just wondering how i would go about sorting the second number so that they ascend from the top?
Thanks for any help (4 Replies)
i have following file have following type of data
1~%%~fcashfafh~%%~9797
can i sort(numeric) the file on first field and then on last feild using awk (3 Replies)
Little-bit of awk experience, need some of the expert help on here. Browsed around here, got a little further, but I am still missing some pieces. Can you help me fill-in my missing awk cells?
Sample data file (leaving out ","'s):
Column 1 Column 2 Column 3 Column 4 ... (10 Replies)
dn: uid=peter@exmaple.com,ou=example-com,ou=mail,dc=example,dc=to
cn: Peter
sn: Norton
displayName: Peter Norton
dn: uid=ras@exmaple.com,ou=example-com,ou=mail,dc=example,dc=to
cn: Ras
sn: Kam
displayName: Ras Kam
i have a text file with 300 entries with multiple ldap entries... (5 Replies)
I have an array with five columns and i want to write it to a file.
Before writing it i must sort it using the field in the fifth column.
_________________________________________
|field 1|field 2|field 3|field 4|field 5|
| | | | | |
| | | |... (6 Replies)
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
Dear Team,
Can any body help me out to get the filed position of the records post sorting using AWK programming.
Thanks in advance
Example Input:
StudentID col-1 col-2 col-3 col-4
1234 14 10 12 13
1235 10 11 12 13
1236 13 12 11 10 ... (3 Replies)
Hi Everyone,
I have below record set. File is fixed widht file
101newjersyus 20150110
101nboston us 20150103
102boston us 20140106
102boston us 20140103
I need to group record based on first 3 letters in our case(101 and 102)
and sort last 8 digit in ascending order and print only... (4 Replies)
Discussion started by: patricjemmy6
4 Replies
LEARN ABOUT DEBIAN
shelr
SHELR(1)SHELR(1)NAME
shelr - screencasting for shell ninjas
DESCRIPTION
Shelr records terminal output and can replay it.
Also you can shere Your records at http://shelr.tv/ or other services.
SYNOPSIS
shelr command [id]
COMMANDS
record Will record your terminal unless you type exit or Ctrl+D and store it to $HOME/.local/share/shelr/
list lists all your shellcasts.
play plays local or remote shellcast.
push publish your shellcast
dump dump shellcast as json to current directory.
EXAMPLES
Record your shellcast:
$ shelr record
$ # do something ...
$ exit
List recorded shellcasts:
$ shelr list
Play local shellcast:
$ shelr play 1293702847 # play your own local record
$ shelr play record.json # created with shelr dump
$ shelr play last # will play most recent local record
Play remote shellcast:
$ shelr play http://shelr.tv/records/4d1f7c3890820d6144000002.json
Publish your shellcast:
$ shelr push 1293702847
$ shelr push last # will push most recent local record
Setup recording backend:
$ shelr backend script
$ shelr backend ttyrec
BUGS
Windows heh.
COPYRIGHT
(C) 2010, 2011, 2012 Antono Vasiljev self@antono.info
Licensed under GPLv3+
SEE ALSO script(1), scriptreplay(1), ttyrec(1), ttyplay(1)
April 2012 SHELR(1)