-1
I want to create an alias to make an executable script, already tried to add to .bash_aliases
and to the .bashrc
commando: alias mksh='touch $1 && chmod +x $1'
-1
I want to create an alias to make an executable script, already tried to add to .bash_aliases
and to the .bashrc
commando: alias mksh='touch $1 && chmod +x $1'
0
use alias + Function:
alias mksh='function __mksh() { touch $*; chmod +x $*; }; __mksh'
you can even use several arguments such as: mksh file1 file2 file3
Browser other questions tagged bash
You are not signed in. Login or sign up in order to post.
@Anderson Carlos Wosss, this...I think the best way is to transform into function, since "alias" does not understand the positional parameters
– zentrunix
meee does not work on zsh
– Diovani