Sponsored Content
Top Forums UNIX for Advanced & Expert Users Select the ranodm percent of the line in the data set Post 302853497 by spacebar on Saturday 14th of September 2013 03:29:56 PM
Old 09-14-2013
I believe this info will do it for you, check it out:
https://www.unix.com/shell-programmin...-randomly.html
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capture two set of data to same line...simple

I would like to capture output from two commands to a test file on the same line... I want to get a file with all Applications and the Version of it...here are the two commands I use to get the output. To get Application list I use ls -1 /Applications/ |grep .app >>... (3 Replies)
Discussion started by: elbombillo
3 Replies

2. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

3. Shell Programming and Scripting

select data from list

Hi! My data file contains a two columns list. It looks like: 1 3.789 2 6.789 3 7.890 4 8.900 5 6.789 6 1.987 7 10.987 8 2.987 9 0.987 I would like to create a new list using the awk command, just selecting data from the second column but also printing the first column. Let say I select... (3 Replies)
Discussion started by: cris48
3 Replies

4. Shell Programming and Scripting

Select lines in which column have value greater than some percent of total file lines

i have a file in following format 1 32 3 4 6 4 4 45 1 45 4 61 54 66 4 5 65 51 56 65 1 12 32 85 now here the total number of lines are 8(they vary each time) Now i want to select only those lines in which the values... (6 Replies)
Discussion started by: vaibhavkorde
6 Replies

5. Shell Programming and Scripting

Select data from a file

Hi , I want to select data from a file .the datas in a file will be in both upper and lower case. can able to select particular data using awk. file is like Ram Selva 24332 UNIXTEAM Karthi Siva 43322 UNIXTEAM In read if i enter selva as lowercase its not displaying result. (9 Replies)
Discussion started by: boopal
9 Replies

6. UNIX for Dummies Questions & Answers

Command line / script option to filter a data set by values of one column

Hi all! I have a data set in this tab separated format : Label, Value1, Value2 An instance is "data.txt" : 0 1 1 -1 2 3 0 2 2 I would like to parse this data set and generate two files, one that has only data with the label 0 and the other with label -1, so my outputs should be, for... (1 Reply)
Discussion started by: gnat01
1 Replies

7. Shell Programming and Scripting

awk : Filter a set of data to parse header line and last field of multiple same match.

Hi Experts, I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output file: ############################################################################################### PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
Discussion started by: rveri
5 Replies

8. UNIX for Dummies Questions & Answers

Using grep to select data from file

Hello all, Once again I need to call upon the masters for help. I have a file called endpoint_data. IN that file I have groups of endpoints. However all I need from the file is this.... ENDPOINT NAME = SIPWOODSBC SIG PRI FQDN/IP ADDRESS/DOMAIN NAME = 10.xxx.xxx.xxx SIG SEC... (4 Replies)
Discussion started by: jay11789
4 Replies

9. Shell Programming and Scripting

awk to select 2D data bins

I wish to use AWK to do something akin: Select all 2D data with 1<$1<2 and -7.5<$2<-6.5 But it's not working awk 'END {print ($1<=2&&$1>=1&&$2<=-6.5&&$2>=-7.5)}' bla Data: -1.06897 -8.04482 -61.469 -1.13613 -8.04482 -61.2271 -1.00182 -8.04482 -61.2081 -1.06897 -8.13518 -60.8544... (2 Replies)
Discussion started by: chrisjorg
2 Replies
vmstat(1)						      General Commands Manual							 vmstat(1)

NAME
vmstat - report virtual memory statistics SYNOPSIS
[interval [count]] | | DESCRIPTION
The command reports certain statistics kept about process, virtual memory, trap, and CPU activity. It also can clear the accumulators in the kernel structure. Options recognizes the following options: Report disk transfer information as a separate section, in the form of transfers per second. Provide an output format that is more easily viewed on an 80-column display device. This format separates the default output into two groups: vir- tual memory information and CPU data. Each group is displayed as a separate line of output. On multiprocessor systems, this display format also provides CPU utilization on a per CPU basis for the active processors. Report the number of processes swapped in and out and instead of page reclaims and address translation faults and interval Display successive lines which are summaries over the last interval seconds. The first line reported is for the time since a reboot and each subsequent line is for the last interval only. If interval is zero, the output is displayed once only. If the option is specified, the column headers are repeated. If is omitted, the column headers are not repeated. The command prints what the system is doing every five seconds. This is a good choice of printing interval since this is how often some of the statistics are sampled in the system; others vary every second. count Repeat the summary statistics count times. If count is omitted or zero, the output is repeated until an interrupt or quit signal is received. From the terminal, these are commonly and respectively (see stty(1)). Report on the number of forks and the number of pages of virtual memory involved since boot-up. Print the total number of several kinds of paging-related events from the kernel structure that have occurred since boot-up or since was last executed with the option. Clear all accumulators in the kernel structure. This option is restricted to the super user. If none of these options is given, displays a one-line summary of the virtual memory activity since boot-up or since the option was last executed. Column Descriptions The column headings and the meaning of each column are: Information about numbers of processes in various states. In run queue Blocked for resources (I/O, paging, etc.) Runnable or short sleeper (< 20 secs) but swapped Information about the usage of virtual and real memory. Virtual pages are considered active if they belong to processes that are running or have run in the last 20 seconds. Active virtual pages Size of the free list Information about page faults and paging activity. These are averaged each five seconds, and given in units per second. Page reclaims (without Address translation faults (without Processes swapped in (with Processes swapped out (with Pages paged in Pages paged out Pages freed per second Anticipated short term memory shortfall Pages scanned by clock algorithm, per second Trap/interrupt rate averages per second over last 5 seconds. Device interrupts per second (nonclock) System calls per second CPU context switch rate (switches/sec) Breakdown of percentage usage of CPU time for the active processors User time for normal and low priority processes System time CPU idle EXAMPLES
The following examples show the output for various command options. For formatting purposes, some leading blanks have been deleted. 1. Display the default output. 2. Add the disk tranfer information to the default output. 3. Display the default output in 80-column format. 4. Replace the page reclaims and address translation faults with process swapping in the default output. 5. Display the default output twice at five-second intervals. Note that the headers are repeated. 6. Display the default output twice in 80-column format at five-second intervals. Note that the headers are repeated. 7. Display the default output and disk transfers twice in 80-column format at five-second intervals. Note that the headers repeated. 8. Display the number of forks and pages of virtual memory since boot-up. 9. Display the counts of paging-related events. WARNINGS
Users of must not rely on the exact field widths and spacing of its output, as these will vary depending on the system, the release of HP- UX, and the data to be displayed. AUTHOR
was developed by the University of California, Berkeley and HP. SEE ALSO
iostat(1). vmstat(1)
All times are GMT -4. The time now is 12:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy