05-05-2011
Quote:
Originally Posted by
purdym
I think that code works perfectly...
So do I.
10 More Discussions You Might Find Interesting
1. AIX
hello
I must to create a ksh script to give a random password with letter, number, and 8 digits.
I can't use the random command with ksh, there is a similar command ?
thank you (1 Reply)
Discussion started by: pascalbout
1 Replies
2. Shell Programming and Scripting
My problem is as follow and i hope you can help:
I currently have this function:
stored_word()
{
number=$RANDOM
let "number %= 21"
case $number in
0 ) echo "energy" ;; 1 ) echo "touch" ;;
2 ) echo "climbing" ;; 3 ) echo "declare" ;;
4 ) echo "marry" ;; 5 ) echo "relax" ... (8 Replies)
Discussion started by: keyvan
8 Replies
3. Shell Programming and Scripting
I am trying to select one random word from a file, any ideas on how to do this as i have only manged to generete the random number? (1 Reply)
Discussion started by: melaz
1 Replies
4. Shell Programming and Scripting
I need to use the $RANDOM command to get a line from a list of lines in a file randomly.
file is
help
go
three
house
film
how do i randomly get one word without looking into the file? (6 Replies)
Discussion started by: relle
6 Replies
5. Windows & DOS: Issues & Discussions
Random question.
32 bit windows can't address more the 4 gb of RAM, right.
So if you have 4gb of “normal” RAM and 1 gb graphics card window only find 3gb of “normal” ram + your graphics card
following on from this
If you where to put 2 graphics card with 2gb of ram on them each,... (4 Replies)
Discussion started by: THM
4 Replies
6. UNIX for Dummies Questions & Answers
Hi, there folks!
Well, trying again to build exercises for my students I come across the following idea.
Inputfile: csv with two fields (f1 and f2) separated by a tab. Each field contains half a sentence, which added to the one contained in the other field forms a complete sentence (s), so... (2 Replies)
Discussion started by: eldeingles
2 Replies
7. UNIX for Dummies Questions & Answers
Hi there folks,
for an exercise for my pupils (you know i am always thinking of them!) i need to randomly re-arrange the words (blank space separated) in a sentence (a line in a textfile). Any inspiration??
Txk so much. (9 Replies)
Discussion started by: eldeingles
9 Replies
8. Ubuntu
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies
9. Shell Programming and Scripting
1
2
4
5
3
I would like to use a script so that i can randomly rearrange these numbers such as
3
5
2
4
1
Thanks! (3 Replies)
Discussion started by: johnkim0806
3 Replies
10. Shell Programming and Scripting
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies
LEARN ABOUT REDHAT
ppmtopgm
ppmtopgm(1) General Commands Manual ppmtopgm(1)
NAME
ppmtopgm - convert a portable pixmap into a portable graymap
SYNOPSIS
ppmtopgm [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces a portable graymap as output. The output is a "black and white" rendering of the original
image, as in a black and white photograph. The quantization formula used is .299 r + .587 g + .114 b.
Note that although there is a pgmtoppm program, it is not necessary for simple conversions from pgm to ppm , because any ppm program can
read pgm (and pbm ) files automatically. pgmtoppm is for colorizing a pgm file. Also, see ppmtorgb3 for a different way of converting
color to gray. And ppmdist generates a grayscale image from a color image, but in a way that makes it easy to differentiate the original
colors, not necessarily a way that looks like a black and white photograph.
QUOTE
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
SEE ALSO
pgmtoppm(1),ppmtorgb3(1),rgb3toppm(1),ppmdist(1),ppm(5),pgm(5)
AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
10 April 2000 ppmtopgm(1)