Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Simplest way to format with If on stout? Post 302555511 by cjcox on Thursday 15th of September 2011 02:41:27 AM
Old 09-15-2011
The -v option is not uniformly supported.. but certainly, if it's there, use it (if you don't mind sacrificing some portability).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

the simplest question in the WORLD

how do i get unix on my windows 95 computer? (3 Replies)
Discussion started by: killfry
3 Replies

2. UNIX for Dummies Questions & Answers

I'm incapable of the simplest thing

Okay, stupid question How can I use ed, exactly? I need just a quick tutorial, thanks. Cheers! Tavy (2 Replies)
Discussion started by: Tavy
2 Replies

3. UNIX for Dummies Questions & Answers

How can I find files by date or size from stout?

Hello all I wander if I make for example " ls -l " And it gives me all the files in the directory with the additional info like data size and privileges But what if I like to filter the stout result for example by date When I try to do: echo "`ls -l`" | grep "Jan 12" it gives me the... (2 Replies)
Discussion started by: umen
2 Replies

4. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

5. Shell Programming and Scripting

stout, stderr to syslog via function with if statement

I have a function called sysLogger in a bash script that I am using to redirect stdout and stderr to syslog. Part of the script contains an option to turn on debugging otherwise I want debugging output to go to /dev/null. I am struggling to understand how to make this work using the function... (10 Replies)
Discussion started by: jelloir
10 Replies

6. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

7. UNIX for Dummies Questions & Answers

Should be the simplest thing in the world grep

should be the simplest thing in the world use grep but i not get it i have several files, in this files i need to khow how many times the words are repeated but the files must star whit P_ this work egrep -c "word1|word2" *P_* result: P_11351814:1 P_11351823:3 P_11351826:1... (2 Replies)
Discussion started by: SirGrifo
2 Replies

8. Programming

The simplest network driver

Hi, I am trying to write the simplest network driver that would send whatever through cable. My configuration is: Linux machine with some Intel network adapter Another machine with WireShark I connected Intel network adapter to second machine and want anything to pop up at wireshark. ... (12 Replies)
Discussion started by: Chrisdot
12 Replies

9. Shell Programming and Scripting

Need script for transferring bulk files from one format to text format

"Help Me" Need script for transferring bulk files from one format to text format in a unix server. Please suggest (2 Replies)
Discussion started by: Kranthi Kumar
2 Replies

10. UNIX for Dummies Questions & Answers

Simplest way to access Linux system mail from email client

I'm not a Linux newbie but this seemed like a pretty n00b question. I am familiar with Postfix/Dovecot setups but now I am looking for the simplest way to access mail on a Linux system, such as the mail that goes to /var/mail/root. I know I can edit /etc/aliases and have the system mail go straight... (6 Replies)
Discussion started by: TayKimchi
6 Replies
drand48(3C)															       drand48(3C)

NAME
drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48() - generate uniformly distributed pseudo- random numbers SYNOPSIS
Obsolescent Interfaces DESCRIPTION
This family of functions generates pseudo-random numbers using the well-known linear congruential algorithm and 48-bit integer arithmetic. In the following description, the formal mathematical notation [low,high) indicates an interval including low but not including high. and return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0,1.0). and return nonnegative long integers uniformly distributed over the interval [0,2^31). and return signed long integers uniformly distributed over the interval [-2^31,2^31). and are initialization entry points, one of which should be invoked before either or is called. (Although it is not recommended practice, constant default initializer values are supplied automatically if or is called without a prior call to an initialization entry point.) and do not require an initialization entry point to be called first. All the routines work by generating a sequence of 48-bit integer values, X[i], according to the linear congruential formula X[n+1] = (a*X[n] + c) modulo m n>=0 The parameter m = 2^48; hence 48-bit integer arithmetic is performed. Unless has been invoked, the default multiplier value a and the default addend value c are given by a = 0x5DEECE66D (base 16) = 0273673163155 (base 8) c = 0xB (base 16) = 013 (base 8) The value returned by any of the functions or is computed by first generating the next 48-bit X[i] in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, are copied from the high-order (leftmost) bits of X[i] and transformed into the returned value. The functions and store the last 48-bit X[i] generated in an internal buffer; that is why they must be initialized prior to being invoked. The functions and require the calling program to provide storage for the successive X[i] values in the array specified as an argument when the functions are invoked. That is why these routines do not have to be initialized; the calling program merely has to place the desired initial value of X[i] into the array and pass it as an argument. By using different arguments, and allow separate modules of a large pro- gram to generate several independent streams of pseudo-random numbers; i.e., the sequence of numbers in each stream do not depend upon how many times the routines have been called to generate numbers for the other streams. The initializer function sets the high-order 32 bits of X[i] to the 32 bits contained in its argument. The low-order 16 bits of X[i] are set to the arbitrary value 0x330E (base 16). The initializer function sets the value of X[i] to the 48-bit value specified in the argument array. In addition, the previous value of X[i] is copied into a 48-bit internal buffer, used only by and a pointer to this buffer is the value returned by This returned pointer, which can be ignored if not needed, is useful if a program is to be restarted from a given point at some future time; use the pointer to get at and store the last X[i] value, and then use this value to reinitialize via when the program is restarted. The initialization function allows the user to specify the initial X[i], the multiplier value a, and the addend value c. Argument array elements param[0-2] specify X[i], param[3-5] specify the multiplier a, and param[6] specifies the 16-bit addend c. After has been called, a subsequent call to either or restores the default multiplier and addend values for a and c, specified above. Obsolescent Interfaces generate uniformly distributed pseudo-random numbers. WARNINGS
and are obsolescent interfaces supported only for compatibility with existing DCE applications. New multithreaded applications should use and SEE ALSO
rand(3C), random(3M), thread_safety(5), random(7). STANDARDS CONFORMANCE
drand48(3C)
All times are GMT -4. The time now is 07:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy