Touch and open file in same command alias
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I find myself typing these commands a lot (on Mac):
$ touch example.txt
$ open example.txt
I was wondering if there was an easier way to do this. I tried this:
$ alias t='touch $0 && open $0âÂÂ
But I got this:
$ t awef.txt
touch: illegal option -- b
Note: I do not want to empty the file. If the file already has content, I just want to open it.
scripting osx alias
New contributor
add a comment |Â
up vote
0
down vote
favorite
I find myself typing these commands a lot (on Mac):
$ touch example.txt
$ open example.txt
I was wondering if there was an easier way to do this. I tried this:
$ alias t='touch $0 && open $0âÂÂ
But I got this:
$ t awef.txt
touch: illegal option -- b
Note: I do not want to empty the file. If the file already has content, I just want to open it.
scripting osx alias
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I find myself typing these commands a lot (on Mac):
$ touch example.txt
$ open example.txt
I was wondering if there was an easier way to do this. I tried this:
$ alias t='touch $0 && open $0âÂÂ
But I got this:
$ t awef.txt
touch: illegal option -- b
Note: I do not want to empty the file. If the file already has content, I just want to open it.
scripting osx alias
New contributor
I find myself typing these commands a lot (on Mac):
$ touch example.txt
$ open example.txt
I was wondering if there was an easier way to do this. I tried this:
$ alias t='touch $0 && open $0âÂÂ
But I got this:
$ t awef.txt
touch: illegal option -- b
Note: I do not want to empty the file. If the file already has content, I just want to open it.
scripting osx alias
scripting osx alias
New contributor
New contributor
New contributor
asked 8 mins ago
rassar
1011
1011
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
rassar is a new contributor. Be nice, and check out our Code of Conduct.
rassar is a new contributor. Be nice, and check out our Code of Conduct.
rassar is a new contributor. Be nice, and check out our Code of Conduct.
rassar is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478026%2ftouch-and-open-file-in-same-command-alias%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password