Question: I want to create a Linux command which creates a file containing 10 random numbers.

This is a solution to generate 10 random numbers;

```
RANDOM=$$
for i in `seq 10`
do
echo $RANDOM
done

```

It is working to generate random numbers but how can I combine this with 'touch' command? Should I create a loop?

Answer: 
Use >> to write to file, $1 is first argument of your .sh file

```
FILE=$1
RANDOM=$$
for i in `seq 10`
do
echo $RANDOM >> $FILE
echo "\n" >> $FILE
done

```
You could use [head(1)](https://man7.org/linux/man-pages/man1/head.1.html) and [od(1)](https://man7.org/linux/man-pages/man1/od.1.html) or [GNU gawk](https://www.gnu.org/software/gawk/) with [random(4)](https://man7.org/linux/man-pages/man4/random.4.html).

For example, perhaps

```
 head -20c /dev/random | od -s > /tmp/tenrandomnumbers.txt

```