Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Script doesn't start and displays number Post 303045893 by Cybora on Friday 17th of April 2020 10:03:11 AM
Old 04-17-2020
Thanks for all your replies. I got sorted it out.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why doesn't sort -k $number work ??

I know this seems like a stupid question. I am trying to sort an address book. Some peole have first, middle and last names, some only have first and last names. Eg: Bob Hope John Bon Jovi etc .. I want to sort this by last name. I was thinking of using something like sort -k $variable... (5 Replies)
Discussion started by: kevin80
5 Replies

2. UNIX for Dummies Questions & Answers

Displays line number 1000 to 2000

Hi, I have 1 million records and want to extract lines betwen 10000 -20000 and put it in another file. Could you please suggest a command for this. Thanks in advance (3 Replies)
Discussion started by: unxusr123
3 Replies

3. Shell Programming and Scripting

Ksh Script to get the start minute of n number of process

How can i write a script.? which lists all X process and gets the start minute of each of them. thanks (1 Reply)
Discussion started by: Anteus
1 Replies

4. Solaris

Number of files - in start of year

Is there any way to find "Number of files" that exists on my solaris parition in the starting of 2009 year ? I know ctime or mtime will not help and unix wouldnt store creation time. Only hope i can see ( and i am not sure if that will help ) is that my system is up from last 2 years without... (5 Replies)
Discussion started by: rajwinder
5 Replies

5. Shell Programming and Scripting

count the number of lines that start with the number

I have a file with contents similar to this. abcd 1234 4567 7666 jdjdjd 89289 9382 92 jksdj 9823 298 I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Discussion started by: grajp002
1 Replies

6. Shell Programming and Scripting

start line numbering with arbitrary number?

Hi, I want to do the following: Extract some lines from different files and copy them into one file, with the first column being the line number. I do this with cat file1 file2 file3 |grep 'xxx' |nl > output.file Works fine. But if I want to add data of interest from a fourth file to the... (2 Replies)
Discussion started by: paracetamol
2 Replies

7. Shell Programming and Scripting

Script that displays contents of a directory

Hello all! I am writing a script that takes in a directory name as input and if the directory exists, it shows the files inside the directory here is what I have so far (incomplete) (mostly like pseudocode) #/bin/sh echo Please enter the name of a directory read dir grep $dir... (2 Replies)
Discussion started by: subway69
2 Replies

8. Shell Programming and Scripting

Start scripts if it doesn't run on other node

Hello community, I created a script to simply query DB and then analize data. The environment where the script will works is two RedHat machines that access both to an external database. My script runs from the first crontab node. But what about if the first node goes down? What I need is copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies

9. Shell Programming and Scripting

The difference between end number in the early row and the start number in the next

Hi Power User, I'm trying to compute this kind of text file format: file1: jakarta 100 150 jakarta 170 210 beijing 220 250 beijing 260 280 beijing 290 320 new_york 330 350 new_york 370 420 tokyo 430 470 tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies

10. Shell Programming and Scripting

Script Output Displays Multiple Text

Hello there, I'm using a read-while loop to preserve the word Failed within a text file. For example, if the word Failed exist twice in a single text file, my STDOUT should re-direct to a new text file and display Failed twice. My output is attached to this thread. I would like output to... (4 Replies)
Discussion started by: SysAdminRialto
4 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 02:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy