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: 
Using touch? Like this?

```
touch file.txt && RANDOM=$$
for i in `seq 10`
  do
  echo $RANDOM
done >> file.txt

```

Not sure why you need touch though, this will also work:

```
for i in `seq 10`; do echo $RANDOM; done > file.txt

```
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

```