create a new file in terminal and write to it at same time code example
Example 1: terminal command to create new file
touch filename.txt
Example 2: how to create a file in terminal
$ mkdir -p turtle/images
touch filename.txt
$ mkdir -p turtle/images