Select the ranodm percent of the line in the data set | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Select the ranodm percent of the line in the data set

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-14-2013
sajmar sajmar is offline
Registered User
 
Join Date: Sep 2013
Last Activity: 7 November 2013, 10:24 PM EST
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Select the ranodm percent of the line in the data set

Hello ;
I have a file which has one column with 7200 ID. These line have been repeated for certain of these ID. for example, ID number 200 repeated 3 times, ID number 201 repeated 2 times and etc. How could I select 20% of the ID numbers randomly without repetition?

Regards
Sajjad
Sponsored Links
    #2  
Old 09-14-2013
spacebar's Avatar
spacebar spacebar is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 2 June 2014, 3:23 PM EDT
Location: spaceBAR Central
Posts: 440
Thanks: 0
Thanked 70 Times in 70 Posts
I believe this info will do it for you, check it out:
http://www.unix.com/shell-programmin...-randomly.html
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk : Filter a set of data to parse header line and last field of multiple same match. rveri Shell Programming and Scripting 5 02-01-2013 01:50 AM
Command line / script option to filter a data set by values of one column gnat01 UNIX for Dummies Questions & Answers 1 07-04-2012 02:29 AM
Select lines in which column have value greater than some percent of total file lines vaibhavkorde Shell Programming and Scripting 6 04-21-2011 05:42 AM
In a csh script, can I set a variable to the result of an SQLPLUS select query? gregrobinsonhd Shell Programming and Scripting 7 04-14-2009 03:51 PM
Capture two set of data to same line...simple elbombillo Shell Programming and Scripting 3 11-28-2008 10:24 AM



All times are GMT -4. The time now is 03:39 AM.