how to get a random line from a text file and save in a varaibale in shell script code example Example: randomly choose n elements from a text file linux shuf -n 1000 file