RANDOM(3P) POSIX Programmer's Manual RANDOM(3P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
random -- generate pseudo-random number
SYNOPSIS
#include <stdlib.h>
long random(void);
DESCRIPTION
Refer to initstate().
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan-
dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source
files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
IEEE /The Open Group 2013 RANDOM(3P)
Check Out this Related Man Page
SETSTATE(3P) POSIX Programmer's Manual SETSTATE(3P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
setstate -- switch pseudo-random number generator state arrays
SYNOPSIS
#include <stdlib.h>
char *setstate(char *state);
DESCRIPTION
Refer to initstate().
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan-
dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source
files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
IEEE /The Open Group 2013 SETSTATE(3P)
I want to generate a random number between 1 and 22.
I believe that the variable $RANDOM generates numbers in the inverval 1-32767.
How do I generate a random integer within a specific interval? (5 Replies)
Can someone do me a favour and explain the following for me:
((r=$RANDOM%$n+1))
I know what $RANDOM does but what is % sign and what does it do with %$n+1? (2 Replies)
Hi
i have a file containg dates likebelow
4/30/2013
3/31/2013
4/30/2013
4/16/2013
4/30/2013
4/30/2013
5/30/2013
5/30/2013
4/30/2013
5/30/2013
5/30/2013
3/31/2013
now i want to compare the above dates with current date and i want to display the difference . (10 Replies)
Who will win 2013 French Open (Men)?
1. N. Djokovic
2. T. Haas
3. R. Nadal
4. S. Wawrinka
5. D. Ferrer
6. T. Robredo
7. R. Federer
8. J. Tsonga
The finals will be held on 9th June 2013. Place your bits here before then. (0 Replies)
Hi,
I have a file
2013-01-01
2013-01-02
01-03-2013
03-03-2013
mar05
I need all the dates YYYY-MM-DD in a separate file and rest of the things in different file.
File 1:
2013-01-01
2013-01-02
File 2: (8 Replies)
once again I need a hint how to operate a dot and a hyphen.
my aim is to use
echo $RANDOM$RANDOM$RANDOMgiving me a bunge of numbers. I need to seperate them into yyy.xxx.zzz-tt
sed i\.makes a dot in front of the output. Before that I tried something likejot -r -n 8 0 9 | rs -q 0or even more... (6 Replies)