Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

random(3p) [posix man page]

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

ERAND48(3P)						     POSIX Programmer's Manual						       ERAND48(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
erand48 -- generate uniformly distributed pseudo-random numbers SYNOPSIS
#include <stdlib.h> double erand48(unsigned short xsubi[3]); DESCRIPTION
Refer to drand48(). 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 ERAND48(3P)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

$RANDOM question

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)
Discussion started by: locoroco
5 Replies

2. Shell Programming and Scripting

Check Sequence

* Expiry DATE: * Address1: Address2: Address3: Address4: Address5: * PO_ref_number: aadad HolderId_1: HolderId_2: HolderId_3: HolderId_4: * adad: 00000 ada: 00000 adad: RANDOM adad: RANDOM ****************************** (4 Replies)
Discussion started by: arunshankar.c
4 Replies

3. Shell Programming and Scripting

Can someone explain this for me?

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)
Discussion started by: bashily
2 Replies

4. Shell Programming and Scripting

Comparing the dates with the current date in perl scripting

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)
Discussion started by: siva kumar
10 Replies

5. What is on Your Mind?

Place you bits! - Who will win 2013 French Open (Men)?

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)
Discussion started by: ni2
0 Replies

6. Shell Programming and Scripting

File processing

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)
Discussion started by: ATWC
8 Replies

7. Shell Programming and Scripting

3digit block separated by a dot and a hyphen

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)
Discussion started by: 1in10
6 Replies