I want to verify that if the seed is same, the resulting pseudo random number is same. Using rand() is the simplest but I’m looking for safer way. I found that using device entropy with /dev/random of linux is very reliable but cannot find how to set exact same seed. I also tried cryptgenrandom of window but cannot find the
Tag: random
Linux tr command not working as expected
I have this password generator: Which works fine as follows: But fails as follows: The tr command is explicitly saying: remove all characters which do not belong to the given set Thus the characters , and . are unexpected. Where do they come from? Answer There’s also another part of tr’s man page that you overlooked: CHAR1-CHAR2 all characters from
Shuffling a large text file without/with group order maintained
Instead of making a script, it there a one liner to shuffle a large tab separated text file, based on the unique elements in the first column. That means, for each unique element in the first column, number of rows will be equal and be specified by the user. There are two output possibilities, maintaining the row order or randomized