Sponsored Content
Full Discussion: Sorting files
Top Forums Shell Programming and Scripting Sorting files Post 99276 by blowtorch on Thursday 16th of February 2006 01:46:53 AM
Old 02-16-2006
Read the man page of sort to know what specific options do. -k specifies what key no. to sort on. Check the man page for details on how to sort in the ascending and descending order.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sorting files

ok so I'm having major issues trying to figure this out: I have this program that I'm inputting the files in hte current directory which are image files...it spits out 5 line chunks describing the files... filename: (name of file) size: (100 x 200) arbitrary data arbitrary data arbitrary... (4 Replies)
Discussion started by: Infraredskies
4 Replies

2. Shell Programming and Scripting

Sorting Files

How to sort such files which contains records of varying length and varying lines? (With respect to Bash shell) Eg: Each record begins with a sting of 1/0(binary) which may or may not be followed by properties like AB,BS etc. I have to sort such records on the basis of 1/0 string and keep the... (2 Replies)
Discussion started by: sandeep_hi
2 Replies

3. Shell Programming and Scripting

need help listing/sorting files

I am currently attempting to create a file which I access from an oracle form. At the minute I do a host command and run an ls -l e.g. /bin/ls -l /dir/dir/dir/ > /tmp/list.txt I then read this file within my oracle form. However I want the user to be able to restrict, sort and filter the... (2 Replies)
Discussion started by: dave_angel
2 Replies

4. UNIX for Dummies Questions & Answers

Need some help for sorting files

I am new to shell scripting can u guys please provide a small script for the following senario step1:need to find some files in a directory for ex having 020908 step2:sort them and redirecting to new file (ex:sort abc > abc.sort) i am trying this but giveing flag error ls -l... (4 Replies)
Discussion started by: cgreddy2020
4 Replies

5. Shell Programming and Scripting

sorting files

hi i have file like below: col1,col2,col3,col4 val1,val2,val3,val4 abc1,abc2,abc3,abc4 this is a 4 column file with 3 rows. i want to sort the file like.. first on col1, then on col2 and so ..on.. i want the sort order to be descending. Pls help.. Thnks Sumit (2 Replies)
Discussion started by: sumit207
2 Replies

6. UNIX for Dummies Questions & Answers

Sorting files in different directories

hi everybody, first time writing. Here's my question: I've got several files in different directories like this: aa/t1 aa/bb/t2 aa/t2 aa/bb/cc/t1 aa/t3 and would like to get this sorting: aa/t1 aa/bb/cc/t1 aa/t2 aa/bb/t2 aa/t3 (1 Reply)
Discussion started by: Camisa
1 Replies

7. UNIX for Dummies Questions & Answers

help with sorting files

find / -type f 2> /dev/null | find -inum +1 2> /dev/null | find -mtime -30 2> /dev/null what i am trying to do i search all regular files in root directory with one or more inodes modified within last 30 days. the /dev/null is to suppress the permission denied outputs. i am now trying to... (5 Replies)
Discussion started by: iluvsushi
5 Replies

8. Shell Programming and Scripting

i need help in sorting two files

i have file a 123 234 456 567 678 and file b 123|xxx|hhh|ppp or zzz 234|rrr|ttt|xxx 432|ttt|mmm|nnn 678|cft|byt|mop i want to compare file a to file b such that when each of the lines in file a can be found in file b column1 and also xxx or hhh or ppp or zzz can be... (12 Replies)
Discussion started by: blackzinga80
12 Replies

9. Shell Programming and Scripting

Sorting files

I have the following set of files and I want to order them according to the ascending values of the run: For example, doing ls -lrt *drw*.log gives n02-z30-sr65-rgdt0p25-dc0p08-4x3drw.log n02-z30-sr65-rgdt0p25-dc0p03-8x6drw.log n02-z30-sr65-rgdt0p25-dc0p01-8x6drw.log ... (18 Replies)
Discussion started by: kristinu
18 Replies

10. Shell Programming and Scripting

Complex data sorting in excel files or text files

Dear all, I have a complex data file shown below,,,,, A_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 C_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 A_ABCDEF715 52410.9 18598.2 10611 10754.7 122535 252426 36631.4 C_DBCDI_1353 0... (19 Replies)
Discussion started by: AAWT
19 Replies
evmsort(1)						      General Commands Manual							evmsort(1)

NAME
evmsort - sort events SYNOPSIS
show_template]] sport_spec] [filename | DESCRIPTION
The command reads and sorts a stream of EVM events. By default, events are read from and are sorted into ascending timestamp order. Sorted events are written to the command's stream in the form of raw EVM events. The sort order can be specified by supplying a sort_spec, either through the option or by setting the environment variable to the required specification. The specification is a character string of the form: key_item[ The key_item is the name of any EVM standard data item and the character is optional. If the special key_item is specified, the event's data item is expanded as described in the evmshow(1) manpage, and the resulting string is used as the sort key. The optional trailing or character indicates ascending or descending sort. By default, items are sorted in ascending order. Multiple items in the string are separated by colon characters The left-most key_item in the specification is the most significant key. If a key_item that is included in the sort specification is not present in an event read from the input stream, the item is considered to have a low value for that event. For example, if input events are being sorted in ascending order according to their data items, and one event does not contain a name, that event appears first in the output stream. If the option is specified, automatically starts and pipes the sorted event stream into it, producing a sorted and formatted display of events. If a argument is also specified with the specified template string is passed to through its own option. See the evmshow(1) manpage for more information. Options Automatically starts to produce a formatted display of the sorted events. The specification to be used in sorting events. See the section for the syntax of the sort_spec, and for details of the default sort order. Template string to be passed to if the option is also specified. If the option is not specified, this argument is ignored. See the evmshow(1) manpage for a description of the template string. Operands filename Reads event sources from filename. If filename is omitted, or is specified as event sources are read from EXTERNAL INFLUENCES
Environment Variables The following environment variables affect the execution of This variable contains a string formatted as described for a sort_spec. If the option is omitted, the string is used as the sort_spec. RETURN VALUES
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
o The following example retrieves all events with a priority of 300 or greater, sorts them into descending order of priority (most urgent event first) and then ascending order of time (oldest event first), and automatically runs to display them. o The following example yields a list of all events, sorted with the latest event first within o The following example yields a list of all events, sorted first in order of their formatted messages and then sorted in ascending order of time. Events are passed to for display and subsequently to the command for viewing. WARNINGS
The command rejects attempts to output raw events to a terminal device. SEE ALSO
Commands evmget(1), evmpost(1), evmshow(1), evmwatch(1). Files evmchannel.conf(4). Event Management EVM(5). EVM Events EvmEvent(5). Event Filter EvmFilter(5). evmsort(1)
All times are GMT -4. The time now is 06:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy