Hi,
From some time, we have noticed that our ascii files have started corrupting due to the presence of some random control characters (^@, ^M, ^H, ^D). The characters appear randomly on any file after the process that creates the file finishes. If we rerun the process, the files re creates... (0 Replies)
I have a directory of files that look like filename 001.ext, filename 002.ext, etc. I'd like to rename the files with unique random numbered names, so that the original filenames are stripped and the files are given a new, random number name. I'm not super new to UNIX, but I don't often use it for... (2 Replies)
hello
i just seeking for a simple way to make a shuffle by block of words in a line. no matter shell (sh/bash) or perl
should be like this:
the message (which is line of some file) splits to packs (packs are random 5-10 words in each) then making a new line inserting those packs in a random... (9 Replies)
I have a text file with 1000 lines, I want to randomly select 200 lines from it and print them as output. How do I go about doing that? Thanks! (7 Replies)
I have two files containing hundreds of different sequences with the same Identifiers (ID-001, ID-002, etc.,), something like this:
Infile1:
ID-001 ATGGGAGCGGGGGCGTCTGCCTTGAGGGGAGAGAAGCTAGATACA
ID-002 ATGGGAGCGGGGGCGTCTGTTTTGAGGGGAGAGAAGCTAGATACA
ID-003... (18 Replies)
Is there any way to place each even column name infront of its odd column using awk or others?
input
Ab name MGH26 B04 MGH26 B05
output
name_Ab B04_MGH26 B05_MGH26 (4 Replies)
Hi Folks,
I have a text file with a thousand lines consisting of words or a group of words separated by commas.
I would like to randomize / shuffle the words on each line.
Eg; file.txt
Linux,Open,Free,Awesome,Best Things in Life,The Greatest
Laptop,PC,Tablet,Home Computers,Digital... (2 Replies)
Hi,
Is there any way I can shuffle the numbers randomly. I have been trying to google and I found lots of 'generator' but is it possible to find the background logic to create randomness?
Thanks, (3 Replies)
Discussion started by: Indra2011
3 Replies
LEARN ABOUT CENTOS
shuf
SHUF(1) User Commands SHUF(1)NAME
shuf - generate random permutations
SYNOPSIS
shuf [OPTION]... [FILE]
shuf -e [OPTION]... [ARG]...
shuf -i LO-HI [OPTION]...
DESCRIPTION
Write a random permutation of the input lines to standard output.
Mandatory arguments to long options are mandatory for short options too.
-e, --echo
treat each ARG as an input line
-i, --input-range=LO-HI
treat each number LO through HI as an input line
-n, --head-count=COUNT
output at most COUNT lines
-o, --output=FILE
write result to FILE instead of standard output
--random-source=FILE
get random bytes from FILE
-r, --repeat
output lines can be repeated
-z, --zero-terminated
end lines with 0 byte, not newline
--help display this help and exit
--version
output version information and exit
With no FILE, or when FILE is -, read standard input.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report shuf translation bugs to <http://translationproject.org/team/>
AUTHOR
Written by Paul Eggert.
COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for shuf is maintained as a Texinfo manual. If the info and shuf programs are properly installed at your site, the
command
info coreutils 'shuf invocation'
should give you access to the complete manual.
GNU coreutils 8.22 June 2014 SHUF(1)