How can I create and open a file from terminal with a single command?

后端 未结 8 1314
野性不改
野性不改 2020-12-24 06:56

To create a file from terminal I type the following...

$ touch filename.py

To open the file I just created from terminal, I then type...

8条回答
  •  不知归路
    2020-12-24 07:28

    Simplest way to do this is

    touch filename; open filename
    

    Example

    touch myfile.py; open myfile.py
    

提交回复
热议问题