Hi, I'm new here an dlearning a lot from this forum. i didnt find any solution for this in the forum.
I have already checked in folders in subversion named
HTT01,... HTT21.. and have files in each folder like below:
HTT01/HTT01_00000.hex
HTT01/HTT01_00000_fb_result.hex... (2 Replies)
Hi guys:
I've got this problem, I want to move a bunch of files to 3 different folders, without any specific order, and I'm trying to automatize it with a shell script.
I'm a newbie at shell scripting so this is my first try:
#!/bin/bash
COUNTER=`ls -1 | wc -l`
while
do
ARRAY=(... (11 Replies)
Hi Friends,
Below is my requirement and i am not clear how to approach this issue in unix programming.
I have a folder with 2500 files. The files are in below format.
1234_name1.txt
1234_name123.txt
4567_name1.txt
4567_name123.txt
and i need a program which will read each file from this... (5 Replies)
Hello,
I need a simple script to Auto-detect new files and folders in the directory.
And then I need to zip the new files and bzip2 new folders and move them out of that folder where I am detecting changes to the other folder.
Remember, I need simple one. If anyone could do it fast, I may... (1 Reply)
Hi,
I am new to shell-scripting, and doing a lot of reading. I am having some trouble getting started with a simple testing of scripting. I have been experimenting with if, loops, for, test, etc., but still unsure. I seem to have the hang of it when it comes to creating a single file or... (6 Replies)
Hello all,
I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders).
Thank you (1 Reply)
I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
Hello all,
do you know any way i can i move folders and its content if folder is older than 1,5 days in bash?
I tried:
find /home/xyz/DATA/* -type d -ctime +1.5 -exec mv "{}" /home/xyz/move_data_here/ \;All i got was that Files from DATA /home/xyz/DATA/* ended messed up in... (1 Reply)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Discussion started by: consultant
4 Replies
LEARN ABOUT SUNOS
rand_r
rand(3C) Standard C Library Functions rand(3C)NAME
rand, srand, rand_r - simple random-number generator
SYNOPSIS
#include <stdlib.h>
int rand(void);
void srand(unsigned int seed);
int rand_r(unsigned int *seed);
DESCRIPTION
The rand() function uses a multiplicative congruential random-number generator with period 2**32 that returns successive pseudo-random num-
bers in the range of 0 to RAND_MAX (defined in <stdlib.h>).
The srand() function uses the argument seed as a seed for a new sequence of pseudo-random numbers to be returned by subsequent calls to
rand(). If srand() is then called with the same seed value, the sequence of pseudo-random numbers will be repeated. 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 rand_r() function has the same functionality as rand() except that a pointer to a seed seed must be supplied by the caller. If
rand_r() is called with the same initial value for the object pointed to by seed and that object is not modified between successive calls
to rand_r(), the same sequence as that produced by calls to rand() will be generated.
The rand() and srand() functions provide per-process pseudo-random streams shared by all threads. The same effect can be achieved if all
threads call rand_r() with a pointer to the same seed object. The rand_r() function allows a thread to generate a private pseudo-random
stream by having the seed object be private to the thread.
USAGE
The spectral properties of rand() are limited. The drand48(3C) function provides a better, more elaborate random-number generator.
When compiling multithreaded applications, the _REENTRANT flag must be defined on the compile line. This flag should be used only in mul-
tithreaded applications.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO drand48(3C), attributes(5), standards(5)SunOS 5.10 19 May 2004 rand(3C)