Sponsored Content
Full Discussion: If with set operators
Top Forums UNIX for Advanced & Expert Users If with set operators Post 302189283 by Khoomfire on Friday 25th of April 2008 11:02:18 AM
Old 04-25-2008
Sorted -
if [[ $a = 1 ]] || [[ $b = 2 ]] || [[ $c = 3 ]]; then
...
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

bitwise operators

can anybody write a program to divide a number by another number using bitwise operators (9 Replies)
Discussion started by: areef4u
9 Replies

2. UNIX for Dummies Questions & Answers

Operators

I am trying to understand Does the following: {tmp+=$10} Mean take $10 and add them all up and call it tmp thanks! (2 Replies)
Discussion started by: llsmr777
2 Replies

3. Shell Programming and Scripting

Operators

I really don't know the meaning of these operators. Could someone explain the meanings so I can make my test for today? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

4. Homework & Coursework Questions

Operators

I really don't know the meaning of these operators. Could someone explain the meanings? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

5. Shell Programming and Scripting

BASH - set specific user variable via string operators

Apologies for the utter triviality of this question, but we all have to start somewhere! I've also tried searching but this question is pretty vague so I didn't (a) really know what to search for or (b) get many relevant hits to what I did search for. Anyway, I'm in the process of self-teaching... (1 Reply)
Discussion started by: u5j84
1 Replies

6. Shell Programming and Scripting

Array operators

Hi Lets say I have two arrays: VAR_1 = "File_A" "File_B" "File_C" "File_D" VAR_2 = "File_A" "File_D" Is there a simple command to get the difference of these list, i.e. VAR_1_2 = "File_B" "File_C" or do I have to write a script and loop through all elements and compare them one by one? ... (1 Reply)
Discussion started by: Wernfried
1 Replies

7. Shell Programming and Scripting

operators in if loop

Hi all, I have a variable which is having the value like below, $ echo ${p} 8 15 22 30 $ My requirement is that the variable should return true when it contains only one number like below, $ echo ${p} 15 $ Otherwise, it should return false if it contains more than one number. I... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

8. Programming

Combining Operators

Hey everyone, I'm really getting into learning C, but as I look at more advanced example code, I see things like if (!*variable1) blah blah blah... and variable2 ^= *(variable1++); my question is, when you have a combination of two operators, like !*. The ! means 'not' and the *... (2 Replies)
Discussion started by: Lost in Cyberia
2 Replies

9. UNIX for Beginners Questions & Answers

Bash -o -v -R operators

I do not know the use of the -o -v -R operators. This is what the info says and I am confused of what optname and varname mean, are they just normal variable? -o optname True if the shell option optname is enabled. See the list of options under the ... (6 Replies)
Discussion started by: kristinu
6 Replies
evmsort(1)						      General Commands Manual							evmsort(1)

NAME
evmsort - Sorts events SYNOPSIS
evmsort [-A] [-s sort_spec] [-t show_template] [filename | -] OPTIONS
Automatically starts evmshow to produce a formatted display of the sorted events. The specification to be used in sorting events. See the DESCRIPTION section for the syntax of the sort_spec, and for details of the default sort order. Template string to be passed to evmshow if the -A option is also specified. If the -A option is not specified, this argument is ignored. See the evmshow(1) reference page for a description of the template string. OPERANDS
Reads event sources from filename. If filename is omitted, or is specified as -, event sources are read from stdin. DESCRIPTION
The evmsort command reads and sorts a stream of EVM events. By default, events are read from stdin, and are sorted into ascending time- stamp order. Sorted events are written to the command's stdout stream in the form of raw EVM events. The sort order can be specified by supplying a sort_spec, either through the -s option or by setting the environment variable EVM_SORT_SPEC to the required specification. The specification is a character string of the form: @key_item[+|-] [ :@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 format data item is expanded as described in the evmshow(1) reference page, 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 can be specified in the string by separating them with 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 name data items, and one event does not contain a name, that event will appear first in the output stream. If the -A option is specified, evmsort automatically starts evmshow and pipes the sorted event stream into it, producing a sorted and for- matted display of events. If a show_template argument is supplied, the specified template string is passed to evmshow through its own -t option. See the evmshow(1) reference page for more information. RESTRICTIONS
The evmsort command rejects attempts to output raw events to a terminal device. ENVIRONMENT VARIABLES
The following environment variables affect the execution of evmsort: This variable contains a string formatted as described for a sort_spec. If the -s flag is omitted, the string is used as the sort_spec. EXAMPLES
The following example retrieves all events with a priority of 300 or greater, sorts them into descending order of priority (most urgent first) and then ascending order of time (oldest first), and automatically runs evmshow to display them. evmget -f '[priority >= 300]' | evmsort -s "@priority-:@timestamp" | evmshow -t "@priority @timestamp @@" The following example yields a list of all events, sorted latest first within name. evmget | evmsort -s "@name:@timestamp-" | evmshow -t "@name @timestamp @@" The following example yields a list of all events, sorted first in order of their formatted messages and then in ascending order of time. Events are passed to evmshow for display, and subsequently to the more command for viewing. evmget | evmsort -A -s "@@:@timestamp" -t "@timestamp @@" | more EXIT VALUES
The following exit values are returned: Successful completion An error occurred 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) delim off evmsort(1)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy