bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new coreutil? shuffle - randomize file contents


From: Davis Houlton
Subject: new coreutil? shuffle - randomize file contents
Date: Sat, 21 May 2005 07:43:25 +0000
User-agent: KMail/1.7.2

Hello,

I recently had to write a shuffle utility for a personal project and was 
wondering if it would make a canidate for the coreutils suite. It seems like 
the kind of utility the toolbox could use (maybe under section 3. Output of 
entire files).

It's a fairly simple program, and while there is room for optimization, works 
fairly quickly enough on my hardware.

It is probably best explained by the quick man page I whipped up:
---------------------------
shuffle(1)                       USER COMMANDS                      shuffle(1)



NAME
       shuffle - Randomize stdin/file contents

SYNOPSIS
       shuffle [--help] [FILE]...

DESCRIPTION
       Randomize  the  contents of all files specified on the command line. If
       no files are specified, shuffle will read from stdin, and write to std-
       out.

OPTIONS
       --help Display short usage information

EXAMPLES
       Randomize contents of a series of files:
              shuffle file1.txt file2.txt file3.txt


       Create a random multimedia playlist based on directory contents:
              find /path/to/media -name *.ogg | shuffle > playlist.pls


       Select a file at random:
              ls | shuffle | head -n 1


EXIT STATUS
       shuffle returns a zero upon succesful completion; a one upon failing to
       read a file and a two upon failing to write a file.

AUTHOR
       Written by Davis Houlton.



version 1.0                      May 21, 2005                       shuffle(1)
---------------------------
Please let me know if this would be considered an appropriate addition, and 
what the next step might be.  I have used GNU utils for decades now, and am 
happy at the opportunity to finally have a chance to give back. Thanks,
  Davis Houlton





reply via email to

[Prev in Thread] Current Thread [Next in Thread]