12-03-2009
I am begginer to to UNIX. Can you please elaborate?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, I know nothing about Unix. Recently received image files from a client. Mac sees it as a Unix executable file. How do I convert these files to Tiff?
Thanks for helping. (1 Reply)
Discussion started by: Pet Teoh
1 Replies
2. Filesystems, Disks and Memory
I've got this problem. My computers and external hard drives are converting many of my files to a Unix Executable File which has a grey terminal looking icon. I don't understand what is causing this to happen. It is happening to a large number of my image file of different formats and also... (1 Reply)
Discussion started by: chadb
1 Replies
3. Shell Programming and Scripting
So I have a lot of Java applications on my servers all having their own folder from the applications subdirectory. Now, I need to do the following.
Search all the applications subdirectories for message.jar.
If the message.jar file exists, I need to search the application directory for... (1 Reply)
Discussion started by: mmdawg
1 Replies
4. OS X (Apple)
I've seen the executable open in the application OmniOutliner, can I create an executable with this app? I'd like to be able to create the unix executable and insert it into terminal, but I'm not sure if the Omni app will allow me to create it.
Any one have any ideas or possibly familiar with... (10 Replies)
Discussion started by: unimachead
10 Replies
5. UNIX for Advanced & Expert Users
The binary file is
ELF-64 executable object file - IA64.
How i know that the source is
Is there any comamnd in unix i can read these kind of files or use a thirty party software?
Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies
6. Shell Programming and Scripting
Hi All,
I am very new in programming. I need some help.
I have one input file like:
Number of disabled taxa: 9
Loading mapping file: ncbi.map
Load mapping:
taxId2TaxLevel: 469951
--- Subsample reads (20%): 66680 of 334386
Processing: tree-from-summary
Running tree-from-summary algorithm... (9 Replies)
Discussion started by: iammitra
9 Replies
7. Shell Programming and Scripting
Hi - How can I find out under sh whitch file is an unix executable file? Need it for an software inventory. Thanks in advance. Regards - Lazybaer (6 Replies)
Discussion started by: lazybaer
6 Replies
8. Shell Programming and Scripting
unix script must do the fiollowing
open a file containing comma delimited records
> each record contains 10 fields
> removes the 2nd field and use that same field containing fields 2 to 10
the original record after fprocessing should containing fields 1 and 3
a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies
9. UNIX for Dummies Questions & Answers
Hi guys,
How to write terminal contents into a file in Unix operating system
Actually I created GUI by using Gtk2-perl. I want to display data on GUI whatever the contents writing on terminal. So which command I have to use and where that command to be run I mean in shell script or Perl... (2 Replies)
Discussion started by: kiran425
2 Replies
10. Shell Programming and Scripting
Hello Team-
we would like to implement an approach which has to write the log file simultaneously
when .sql file is executing by Unix process. At present,it is writing the log file
once the process is completed. I've tested the current process with the below
approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies
rand(3) Library Functions Manual rand(3)
delim $$
NAME
rand, rand_r, srand - Generates pseudorandom numbers
LIBRARY
Standard C Library (libc.so, libc.a) Berkeley Compatibility Library (libbsd.a)
SYNOPSIS
#include <stdlib.h> int rand (void);
int rand_r(
unsigned int *seedptr);
void srand(
unsigned int seed);
The following function does not conform to current standards and is supported only for backward compatibility:
int rand_r(
unsigned int *seedptr,
int *randval);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
rand_r(): POSIX.1c
rand(), srand(): XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies an initial seed value. Points to a seed value, updated at each call. Points to a place to store the random number.
DESCRIPTION
The rand() function returns successive pseudorandom numbers in the range from 0 (zero) to RAND_MAX. The sequence of values returned
depends on the seed value set with the srand() function. If rand() is called before any calls to srand() have been made, the same sequence
will be generated as when srand() is first called with a seed value of 1.
The srand() function resets the random-number generator to a random starting point. The generator is initially seeded with a value of 1.
The rand() function is a very simple random-number generator. Its spectral properties, the mathematical measurement of how random the num-
ber sequence is, are somewhat weak.
[POSIX] The rand_r() function is the reentrant version of the rand() function. The rand_r() function places the seed value at the address
pointed to by seedptr, and returns the random number.
[Tru64 UNIX] The obsolete version of the rand_r() function places the seed value at the address pointed to by seedptr, and places the ran-
dom number at the address pointed to by randval.
See the drand48() and random() functions for more elaborate random-number generators that have better spectral properties.
NOTES
[POSIX] The rand() function is not supported for multithreaded applications. Instead, its reentrant equivalent, rand_r(), should be used
with multiple threads.
The BSD version of the rand() function returns a number in the range 0 to (2^31)-1, rather than 0 to (2^15)-1, and can be used by compiling
the code with the Berkeley Compatibility Library (libbsd.a).
There are better random number generators, as noted above; however, the rand() and srand() functions are the interfaces defined for the
ANSI C library.
The following functions define the semantics of the rand() and srand() functions, and are included here to facilitate porting applications
from different implementations: static unsigned int next = 1; int myrand(void) {
next = next * 1103515245 + 12345;
return ( (next >>16) & RAND_MAX); } void mysrand (unsigned int seed) { next = seed }
RETURN VALUES
The rand() function returns the next pseudorandom number in the sequence.
[POSIX] The rand_r function returns the next random number in the sequence.
[Tru64 UNIX] Upon successful completion, the obsolete version of the rand_r() function returns a value of 0 (zero). Otherwise, -1 is
returned and errno is set to indicate the error.
The srand() function returns no value.
ERRORS
[Tru64 UNIX] If the rand_r() function fails, errno may be set to the following value: Either seedptr or randval is a null pointer. delim
off
RELATED INFORMATION
Functions: drand48(3), random(3)
Standards: standards(5) delim off
rand(3)