08-24-2010
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Discussion started by: patrick87
3 Replies
2. Shell Programming and Scripting
Hello,
I need to print four lines inmediatly after the regexp, but not the line containing the regexp. The print should show the four lines together in one.
Thanks! (13 Replies)
Discussion started by: auratus42
13 Replies
3. Shell Programming and Scripting
Hello,
I need an awk command to print only the lines that match regex on xth field from file.
For example if I use this command
awk -F"|" ' $22 == "20130117090000.*" 'It wont work, I think, because single quotes wont allow the usage of the metacharacter star * . On the other hand I dont know... (2 Replies)
Discussion started by: black_fender
2 Replies
4. Shell Programming and Scripting
Hi,
I am using the following code to fetch lines that are generated in last 1 hr . Hence, I am using date function to calculate -last 1 hr & the current hr and then somehow use awk (or sed-if someone could guide me better)
with some regex pattern.
dt_1=`date +%h" "%d", "%Y\ %l -d "1 hour... (10 Replies)
Discussion started by: sarah-alikhan31
10 Replies
5. UNIX for Dummies Questions & Answers
I need to print a specific string from an html file that's always occurring between two other known strings. Example: from the text below, I would like to print the bolded part:
<this is a lot of text before the string I want
to print> fullpath: abc/def/ghi/example.xlf -cfver. <sample text... (15 Replies)
Discussion started by: danegon
15 Replies
6. Shell Programming and Scripting
I want to expand on a question that I just asked here:
I want to extract only those values in Column 2 that are shared by at least 2 unique values in Column 2.
Using the same input (in this case 3- tab-separated columns):
waterline-n below-sheath-v 14.8097
dock-n below-sheath-v ... (2 Replies)
Discussion started by: owwow14
2 Replies
7. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
8. Shell Programming and Scripting
Hello....
Pls help me (and sorry my english) :)
So
I have a file (test.txt) with 1 long line.... for example:
isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh
How to print after the "error" word the 2nd 4th 5th and 7th word??
output well be:
653 isfbisfb... (2 Replies)
Discussion started by: marvinandco
2 Replies
9. Shell Programming and Scripting
from the CLI on a Mac, if you type networksetup -listallnetworkservices then you get results in a multi-line paragraph that look something like this:
networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Wi-Fi
Display Ethernet
Bluetooth DUN... (7 Replies)
Discussion started by: hungryd
7 Replies
10. Shell Programming and Scripting
Hello.
I have been looking high and low for the solution for this. I seems there should be a simple answer, but alas.
I have a big xml file, and I need to extract certain information from specific items. The information I need can be found between a specific set of tags. let's call them... (2 Replies)
Discussion started by: Tobias-Reiper
2 Replies
iostat(1) General Commands Manual iostat(1)
NAME
iostat - Reports I/O statistics
SYNOPSIS
iostat [drive...] [interval] [count]
OPERANDS
Forces iostat to display specific drives. If drive is not specified (or the specified drive does not exist on the system or cluster,
iostat displays the first two drives (even if more than two disk drives are configured in the system). Causes iostat to report once each
interval seconds. The first report is for all time since the system was last booted, and each subsequent report is for the last interval
only.The value must not be 0. Specifies the number of reports. For example, iostat 1 10 would produce 10 reports at 1-second intervals.
You cannot specify count without interval because the first numeric argument to iostat is assumed to be interval.
DESCRIPTION
The iostat command reports the following information: For terminals (collectively), the number of characters read and written per second.
For each disk, the number of transfers per second and bytes transferred per second (in kilobytes). For the system, the percentage of time
the system has spent in user mode, in user mode running low priority (nice) processes, in system mode, and idling.
To compute this information, iostat counts data transfer completions, the number of words transferred for each disk, and the collective
number of input and output characters for terminals. Also, each sixtieth of a second, iostat examines the state of each disk and makes a
tally if the disk is active.
When you issue an iostat command on a cluster member, it displays statistics only for those disks that are local to the member and that
member's usage of those shared disks that it has mounted. It displays 0 for other disks in the cluster (those it doesn't have mounted),
regardless of whether they are on the shared bus or are local to some other member.
EXAMPLES
The output from this example displays cpu, terminal, and disk statistics for the first two disks on the system providing 5 reports at 1
second intervals:
# iostat 1 5
tty floppy1 dsk9 cpu
tin tout bps tps bps tps us ni sy id
0 3 0 0 0 0 1 0 4 95
4 58 0 0 0 0 1 0 2 97
1 53 0 0 0 0 0 0 2 98
5 59 0 0 0 0 1 0 1 98
6 60 0 0 0 0 1 0 2 97
The second example specifies device names in the command:
# iostat dsk2 dsk3 cdrom2
tty dsk2 cdrom2 dsk3 cpu
tin tout bps tps bps tps bps tps us ni sy id
0 13 11 5 5 2 2427 1213 0 1 1 98
SEE ALSO
Commands:vmstat(1)
iostat(1)