Sponsored Content
Full Discussion: Randomize a file
Top Forums Shell Programming and Scripting Randomize a file Post 302809459 by kylle345 on Monday 20th of May 2013 12:28:35 AM
Old 05-20-2013
Randomize a file

Hi,

I have a large file that looks like this:

Code:
@FCC189PACXX:2:1101:1420:2139/1
AGCGAGACTCCGTCTCAAAAAGAAAAAATTTTTCAAAATATTGCAATGGGCTTGTAATTTCTGCTTAAATGTCAGGAGGTCTGAGCCATT
+
bbbeeeceggggghiiiiiiiiiihfihihiiihhhghiihhihifhihiihhhhhhhhiiigfggggdceeeeebdcc^``bbcbccbb
@FCC189PACXX:2:1101:1368:2220/1
AGCTGTTGTCCTCCTCATTCTCGCAATCGCTGCAGTGCTCATGGCCGTTCCCGTTCCCTTCCATCATCTGCGGCAGCGGAGGTGCCCGCG
+
___eeceegacegeghihhdf`ggfhi`ebeWeccegcfdgihih_cceefcgghedf_\\`ddZbYZ^RZX`]^BBBBBBBBBBBBBBB
@FCC189PACXX:2:1101:2390:2054/1
NAAGTGGTAAATAATAAGCCTCCTGACTTGTGGTTGTAGCCTCATTTCTTGGTGTATGACAATTGACACTTCTGTAGAAAACCTGCTGGC
+
BP\cccecgggggiiiiiiiiiiiiiiiihhhhhiiiiiiiiihiiiiiiihgfhigiihiegifffhiiiiiehggggggddeeeddcc
@FCC189PACXX:2:1101:2484:2119/1
CAAAATCACTAAAATGCCCTGCCAGTCATTACAACCAGAACCAATAAACACCCCAACACACACAAAACAACAGTTGAAGGCATCCCTGGG
+
bbbeeeeeggggfiiiiiiiiiihifhihiiiihiihihiiihhiiiiiiiiifiiiiiiiigggeeeeccccddb`_bb`abccccc^a
@FCC189PACXX:2:1101:2450:2153/1
AAGCTTTCTTGAAATTAAGTATGTCATAACCTTCATTTCTGTTATGTGTAGCTGGCAGAGAGAGACAAGAATAAGAAACTTTGGAGGGCG
+
bbbeeeeegggggiiiiiiihihiiihiiiiiiiihiiiiihhhhihihhhiiihiihhihihhhhhiifghcbfdfggggggeedecba

These four lines would be a feature

Code:
@FCC189PACXX:2:1101:2450:2153/1
AAGCTTTCTTGAAATTAAGTATGTCATAACCTTCATTTCTGTTATGTGTAGCTGGCAGAGAGAGACAAGAATAAGAAACTTTGGAGGGCG
+
bbbeeeeegggggiiiiiiihihiiihiiiiiiiihiiiiihhhhihihhhiiihiihhihihhhhhiifghcbfdfggggggeedecba

Asssuming you can randomize each feature (every four lines). Not sure if I am clear here.

Thanks
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Randomize letters

Hi, Is there a tool somewhat parallel to rev, but which randomizes instead of reverses? I've tried rl, but I can only get it to randomize words. I was hoping for something like this echo "hello" | ran leolh less simpler solutions are also welcome. Sorry if the question is... (21 Replies)
Discussion started by: jeppe83
21 Replies

2. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

3. Shell Programming and Scripting

Randomize a matrix

--please have a look at my third post in this thread! there I explained it more clearly-- Hey guys. I posted a complex problem few days back. No reply! :| Here is simplified question: I have a matrix with 0/1: * col1 col2 col3 row1 1 0 1 row2 0 0 ... (5 Replies)
Discussion started by: @man
5 Replies

4. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

5. Shell Programming and Scripting

Randomize columns in CSV file

Hi there, friends! Writing exams again! This time my wish would be to randomize certain columns in a csv file. Given a file containing records consisting of 3 columns tab-separated: A B C A B C A B C I would love to get the columns of each record in random order...separated by a tab as... (12 Replies)
Discussion started by: eldeingles
12 Replies

6. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
Graphics::Primitive::Insets(3pm)			User Contributed Perl Documentation			  Graphics::Primitive::Insets(3pm)

NAME
Graphics::Primitive::Insets - Space between things DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding or margins (in the CSS sense, one being inside the bounding box, the other being outside) SYNOPSIS
use Graphics::Primitive::Insets; my $insets = Graphics::Primitive::Insets->new({ top => 5, bottom => 5, left => 5, right => 5 }); METHODS
Constructor new Creates a new Graphics::Primitive::Insets. Instance Methods as_array Return these insets as an array in the form of top, right, bottom and left. bottom Set/Get the inset from the bottom. equal_to Determine if these Insets are equal to another. left Set/Get the inset from the left. right Set/Get the inset from the right. top Set/Get the inset from the top. zero Sets all the insets (top, left, bottom, right) to 0. AUTHOR
Cory Watson, "<gphat@cpan.org>" SEE ALSO
perl(1) COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy