7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Newbie here. My goal is to have the expect script log into the Ubuntu 18.04 server and run two commands (lsb_release -a and ip addr) and eventually pipe the output/results to a file. For now, I would be happy to get this one command or two to run successfully. How to fix this?
#!/usr/bin/expect ... (3 Replies)
Discussion started by: jacob600
2. Shell Programming and Scripting
I am using the below to random generate a password but I need to have 2 numeric characters and 6 alphabetic chars
head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo ''
------ Post updated at 04:43 PM ------
Any Help folks - Can the output be passed onto a sed command to... (9 Replies)
Discussion started by: infernalhell
I have created a script to generate a random password on Linux/Solaris, but I simply cannot use it on my AIX VMs since Bash isn't installed on them.
I need a password that is randomly created with the following... (12 Replies)
Discussion started by: gfroute
4. Shell Programming and Scripting
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
Here i have attached a text file where iam facing problem in my code.
Please read the file and help me out of this issue..
Thanks in advance (4 Replies)
Discussion started by: vanid
I need a function to generate a random alphanumeric password in C code. It needs to be between 6-8 characters and follow the following rules:
Reject if same char appears # time: 4 or more
Reject if same char appears consecutively: 3 or more
I have the following random password working for... (2 Replies)
Discussion started by: vjaws
7. Shell Programming and Scripting
Can someone help me generate a random password which will be 7 characters long which contains alpha-numeric characters using shell script.
I am looking to store the output of the script that generates the password to a variable within a script and use it as the password.
... (5 Replies)
Discussion started by: chiru_h
rand(3UCB) SunOS/BSD Compatibility Library Functions rand(3UCB)
rand, srand - simple random number generator
/usr/ucb/cc[ flag ... ] file ...
int srand( seed);
rand() uses a multiplicative congruential random number generator with period 2**32 to return successive pseudo-random numbers in the range
from 0 to "2**31 -1."
srand() can be called at any time to reset the random-number generator to a random starting point. The generator is initially seeded with a
value of 1.
drand48(3C), rand(3C), random(3C)
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system
libraries or in multi-thread applications is unsupported.
The spectral properties of rand() leave a great deal to be desired. drand48(3C) and random(3C) provide much better, though more elaborate,
The low bits of the numbers generated are not very random; use the middle bits. In particular the lowest bit alternates between 0 and 1.
SunOS 5.10 12 Feb 1993 rand(3UCB)