Sample Header Ad - 728x90

How to replace Shuf with rand (from C++) with a seed of time in order to make my script more random

0 votes
1 answer
337 views
I have this script that extracts 200 random characters from a set: `tail -n+2 file.fasta | tr -d '\n' > newfile` `n=$(stat -c "%s" newfile)` `r=$(shuf -i1-"$((n-200+1))" -n1)` `newfile tail -c+"$r" | head -c200` Do anyone knows if it is possible to change shuf for rand() using a seed of time (srand(time(0))? I tried to change my script without any success... Any suggestions? thanks in advance
Asked by GSQ (37 rep)
Dec 10, 2020, 04:02 PM
Last activity: Dec 10, 2020, 06:48 PM