Sponsored Content
Full Discussion: $(< file ) and $( cat file )
Top Forums Shell Programming and Scripting $(< file ) and $( cat file ) Post 303012362 by ctsgnb on Friday 2nd of February 2018 04:02:11 PM
Old 02-02-2018
Just for fun playing with subsequent args ... consider giving a try to:

Code:
# for i in $(seq 1 10) ; do echo $(< /dev/urandom tr -dc '[:alnum:],@#:!?+-' | head -c10) ; done
# for i in $(seq 1 10) ; do echo $(cat /dev/urandom -- tr -dc '[:alnum:],@#:!?+-' | head -c10) ; done
# for i in $(seq 1 10) ; do echo $(cat /dev/urandom | tr -dc '[:alnum:],@#:!?+-' | head -c10) ; done
# for i in $(seq 1 10) ; do echo $(< /dev/urandom | tr -dc '[:alnum:],@#:!?+-'  | head -c10) ; done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cat and lp or pr printing of file

Can you use cat to send the first 25 lines of a file to the printer? I'm thinking I can pipe it with '|' but I'm not school to check printer output. With the 'nl' used, all lines are numbered on the print out, but how does one number only the blank lines? Thanks:) (1 Reply)
Discussion started by: bitwize
1 Replies

2. Shell Programming and Scripting

cat file problem

Hi, I wnat to read a fiel line by line and store each line in a variabel, so I made a for loop: for i in `cat file` ; do #do sth. done; The problem is, that in the file, there are lines with only asterisks like this... (3 Replies)
Discussion started by: bensky
3 Replies

3. UNIX for Dummies Questions & Answers

Easiest way to cat out first 100 lines of a file into a different file?

Not sure how to do this exactly.. just want to take the first 100 lines of a file and cat it out into a second file. I know I can do a more on a file and > it into a different file, but how can I make it so only the first 100 lines get moved over? (1 Reply)
Discussion started by: LordJezo
1 Replies

4. UNIX for Dummies Questions & Answers

How to cat file

I want to cat a file with only show the line contain '/bin/bash' but don't show the line contain 'load' (don't show if the line contain 'load' and '/bin/bash' together), how to type in the command? thk a lot! (2 Replies)
Discussion started by: zp523444
2 Replies

5. Shell Programming and Scripting

Cat all yesterdays file into one file?

I am looking for a command to take files with a specific date and cat them all into big file. I know I can use commands to list all of the files from a certain date. But I want to do that and take those files and make on large files containing all of them. Any help would be great. This is being... (1 Reply)
Discussion started by: Jcheetwood
1 Replies

6. Shell Programming and Scripting

split a line of a file and cat a file with another

Hi, I have two files one.txt laptop boy apple two.txt unix linux OS openS I want to split one.txt into one line each and concatenate it with the two.txt output files onea.txt laptop (4 Replies)
Discussion started by: avatar_007
4 Replies

7. Shell Programming and Scripting

Cat file

how to cat a file by ignoring first line and last line (1 Reply)
Discussion started by: thelakbe
1 Replies

8. UNIX for Advanced & Expert Users

cat can not open file

Hi All, I have stumbled upon very unique issue. In my script I am doing cat file and then greping and cutting so as to assign the value to variable. My file is, <mxc_tl_load_extractdata_prop.bsh> DB_USER=test_oper hostname=xxx FTP_USER=test1_operate MAIL_LIST=xxx@yyy.com... (1 Reply)
Discussion started by: paragd
1 Replies

9. UNIX for Advanced & Expert Users

for i in `cat file` do

in bash: for i in `cat file` ; do echo $i done; how will i do this in perl ? (10 Replies)
Discussion started by: linuxgeek
10 Replies

10. Shell Programming and Scripting

Ssh cat file output into a file on local computer

Hello, I'm on a remote computer by SSH. How can I get the output of "cat file" into a file on the local computer? I cannot use scp, because it's blocked. something like: ssh root@remote_maschine "cat /file" > /locale_machine/file :rolleyes: (2 Replies)
Discussion started by: borsti007
2 Replies
RANDOM(4)						   BSD Kernel Interfaces Manual 						 RANDOM(4)

NAME
random , urandom -- random data source devices. SYNOPSIS
pseudo-device random DESCRIPTION
The random device produces uniformly distributed random byte values of potentially high quality. To obtain random bytes, open /dev/random for reading and read from it. To add entropy to the random generation system, open /dev/random for writing and write data that you believe to be somehow random. /dev/urandom is a compatibility nod to Linux. On Linux, /dev/urandom will produce lower quality output if the entropy pool drains, while /dev/random will prefer to block and wait for additional entropy to be collected. With Yarrow, this choice and distinction is not necessary, and the two devices behave identically. You may use either. OPERATION
The random device implements the Yarrow pseudo random number generator algorithm and maintains its entropy pool. Additional entropy is fed to the generator regularly by the SecurityServer daemon from random jitter measurements of the kernel. SecurityServer is also responsible for periodically saving some entropy to disk and reloading it during startup to provide entropy in early system operation. You may feed additional entropy to the generator by writing it to the random device, though this is not required in a normal operating envi- ronment. LIMITATIONS AND WARNINGS
Yarrow is a fairly resilient algorithm, and is believed to be resistant to non-root. The quality of its output is however dependent on regu- lar addition of appropriate entropy. If the SecurityServer system daemon fails for any reason, output quality will suffer over time without any explicit indication from the random device itself. Paranoid programmers can counteract this risk somewhat by collecting entropy of their choice (e.g. from keystroke or mouse timings) and seed- ing it into random directly before obtaining important random numbers. FILES
/dev/random /dev/urandom HISTORY
A random device appeared in the Linux operating system. Darwin September 6, 2001 Darwin
All times are GMT -4. The time now is 10:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy