cat: create/write file

 

Create file without replacing variables:

If you check /path/file you will see exactly the content above.
Create file REPLACING the variables while creating:

In this example, the variable ${0} will be replaced during the creation of the file, hence the content will display your username.