Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ser81
  • Order by date
  1. ser81

    random partitions

    I don't think marsd's script is exactly what I want. I actually want 10 random samples from my datafile (each 1/10th of the datafile. I use this script to select a random sample from a datafile: BEGIN { select = 100 # random sample remaining = 1000 # number of records } { if (rand() <...
  2. ser81

    random partitions

    Hi, I'm looking for a script that generates 10 random partitions of my datafile and writes these partitions to 10 different files. Thanks
  3. ser81

    [Q] How to insert the content of the file into the other file???

    Hi CyanBlue, if you want to insert the content of a second file in your file you can use getline: { if (NR == line) { print while ((getline < &quot;FileB.txt&quot;) > 0) { print } } else print } awk -f script.awk -v line=4 FileA.txt Greetz, Sancho

Part and Inventory Search

Back
Top