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
ppmtosixel(1)                                                 General Commands Manual                                                ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy