Are you missing the first part of the request?
#!/bin/sh
history | tail -3 >file_1
f_name="file_1"
cat $f_name
It appears that the first part of the instructions are to create a file with 3 lines of text. So, need something to generate 3 lines of text. (And there are many other ways to generate random text.)
|