I have text file which contains numerous lines. I need to do:
- shuf txt.txt
- From shuf output read first line to a variable $line
How to represent it in one line for bash script?
Now it is like this:
shuf txt.txt -o aaa.txt
n=$(head -n 1 aaa.txt)
rm -rf aaa.txt
As you may notice, it is not very nice