How can I make an alias that has an executable's name The 2019 Stack Overflow Developer Survey...
Working through the single responsibility principle (SRP) in Python when calls are expensive
Word to describe a time interval
Is an up-to-date browser secure on an out-of-date OS?
Was credit for the black hole image misappropriated?
How do you keep chess fun when your opponent constantly beats you?
Would an alien lifeform be able to achieve space travel if lacking in vision?
What do I do when my TA workload is more than expected?
How did passengers keep warm on sail ships?
Am I ethically obligated to go into work on an off day if the reason is sudden?
Make it rain characters
What aspect of planet Earth must be changed to prevent the industrial revolution?
Are spiders unable to hurt humans, especially very small spiders?
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
Why can't devices on different VLANs, but on the same subnet, communicate?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Did the new image of black hole confirm the general theory of relativity?
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
Do working physicists consider Newtonian mechanics to be "falsified"?
Is there a writing software that you can sort scenes like slides in PowerPoint?
What's the point in a preamp?
Can a flute soloist sit?
Does Parliament hold absolute power in the UK?
Can I visit the Trinity College (Cambridge) library and see some of their rare books
How can I make an alias that has an executable's name
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election ResultsHow can I `alias sudo !!`?Alias for finding a file not working in bashHow to make the zsh “correct” functionality remember my spell-correction decisionsHow to alias rm to always confirmHow to make alias trailing with space hack works with parameter suppliedHow can bash aliases be configured to handle spaces in directory names?Insert alias in sudoers fileHow do I make a working emacs alias function?How can I alias a history expansion in zsh?How to create alias with a command contains ' and "
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I tried to implement the following line in my .bashrc
,
alias ./my_exec='printf "foo"'
However, the alias doesn't work, and the following line appears :
bash: alias: `./my_exec': invalid alias name
I know that the zsh
terminal can make this work, but I wouldn't switch to it for this only thing.
Is there is a way I can make this alias work ?
bash alias
New contributor
|
show 1 more comment
I tried to implement the following line in my .bashrc
,
alias ./my_exec='printf "foo"'
However, the alias doesn't work, and the following line appears :
bash: alias: `./my_exec': invalid alias name
I know that the zsh
terminal can make this work, but I wouldn't switch to it for this only thing.
Is there is a way I can make this alias work ?
bash alias
New contributor
2
You need to use a valid name, such as:alias my_exec='printf "foo"'
. Or, is there some reason that you want the./
as part of the alias name?
– John1024
5 hours ago
Yes, the./
is necessary to me
– HeyShafty
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
1
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I havezsh
, so he could prank me by doing it, I just want payback
– HeyShafty
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago
|
show 1 more comment
I tried to implement the following line in my .bashrc
,
alias ./my_exec='printf "foo"'
However, the alias doesn't work, and the following line appears :
bash: alias: `./my_exec': invalid alias name
I know that the zsh
terminal can make this work, but I wouldn't switch to it for this only thing.
Is there is a way I can make this alias work ?
bash alias
New contributor
I tried to implement the following line in my .bashrc
,
alias ./my_exec='printf "foo"'
However, the alias doesn't work, and the following line appears :
bash: alias: `./my_exec': invalid alias name
I know that the zsh
terminal can make this work, but I wouldn't switch to it for this only thing.
Is there is a way I can make this alias work ?
bash alias
bash alias
New contributor
New contributor
New contributor
asked 5 hours ago
HeyShaftyHeyShafty
113
113
New contributor
New contributor
2
You need to use a valid name, such as:alias my_exec='printf "foo"'
. Or, is there some reason that you want the./
as part of the alias name?
– John1024
5 hours ago
Yes, the./
is necessary to me
– HeyShafty
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
1
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I havezsh
, so he could prank me by doing it, I just want payback
– HeyShafty
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago
|
show 1 more comment
2
You need to use a valid name, such as:alias my_exec='printf "foo"'
. Or, is there some reason that you want the./
as part of the alias name?
– John1024
5 hours ago
Yes, the./
is necessary to me
– HeyShafty
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
1
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I havezsh
, so he could prank me by doing it, I just want payback
– HeyShafty
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago
2
2
You need to use a valid name, such as:
alias my_exec='printf "foo"'
. Or, is there some reason that you want the ./
as part of the alias name?– John1024
5 hours ago
You need to use a valid name, such as:
alias my_exec='printf "foo"'
. Or, is there some reason that you want the ./
as part of the alias name?– John1024
5 hours ago
Yes, the
./
is necessary to me– HeyShafty
4 hours ago
Yes, the
./
is necessary to me– HeyShafty
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
1
1
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I have
zsh
, so he could prank me by doing it, I just want payback– HeyShafty
4 hours ago
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I have
zsh
, so he could prank me by doing it, I just want payback– HeyShafty
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago
|
show 1 more comment
3 Answers
3
active
oldest
votes
maybe you need a function
my_exec(){
print "foo"
}
this found for me,
countryip(){
COUNTY="$(whois $1 | grep ountry))"
echo "$COUNTRY $1 n"
}
$ countryip 192.168.0.1
New contributor
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works inbash
andzsh
.
– mosvy
4 hours ago
add a comment |
$ BASH_ALIASES[./my_exec]='echo yes'
$ ./my_exec
yes
According to the bash manpage, you cannot use /
in an alias name:
The characters
/
,$
,`
, and=
and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
When defining an alias via the alias name=val
syntax, bash will refuse any alias name that contains any character defined by the regex:
[ tn&();<>|\"'`$/]
See the legal_alias_name()
function in its source code. Notice that the lack of =
above is not an omission; the impossibility of using it in an alias name is simply an artifact of the syntax.
But you can use some of those characters in an alias, by defining it indirectly via the BASH_ALIASES
array:
$ BASH_ALIASES['/a=$']='echo yes'; /a=$
yes
Alias names in the susv4 standard
3.10 Alias Name
In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set and any of the
following characters:!
,%
,,
,@
.
Implementations may allow other characters within alias names as an extension.
So both bash
and zsh
(which allows /
to be used in alias names directly) are within the standard.
Slashes and other funny chars in function names
In bash
and zsh
, a /
can be used directly in a function name:
$ /bin/sh(){ echo no bin/sh today; }
$ /bin/sh -c ls
no bin/sh today
This is a non-standard extension; in a standard shell, a function name can contain only ascii letters, digits and underscores, and cannot start with a digit.
In bash
, a function name can be made up of any characters except $
, with the condition that is doesn't contain only digits and within the constraints imposed by the function definition syntax. You can look at execute_intern_function()
and check_identifier()
for all the details.
In zsh
the all-digits constraint doesn't apply, and a function name can also be quoted/escaped in the definition:
zsh$ 666() echo "$0"; $() echo "$0"
zsh$ 666; $
666
$
add a comment |
The question here is that we are forgetting that
'./'
says to the
shell 'looks at this file, command is here in this directory that I am
now "current directory
" and here in this case it is not necessary
your presence because as we are seeing will occur a clear mistake! in
case you should declare thealias
normally just like any other alias
alias my_exec = 'echo "foo "'
here you will get a better result. OK!
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
HeyShafty 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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512191%2fhow-can-i-make-an-alias-that-has-an-executables-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
maybe you need a function
my_exec(){
print "foo"
}
this found for me,
countryip(){
COUNTY="$(whois $1 | grep ountry))"
echo "$COUNTRY $1 n"
}
$ countryip 192.168.0.1
New contributor
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works inbash
andzsh
.
– mosvy
4 hours ago
add a comment |
maybe you need a function
my_exec(){
print "foo"
}
this found for me,
countryip(){
COUNTY="$(whois $1 | grep ountry))"
echo "$COUNTRY $1 n"
}
$ countryip 192.168.0.1
New contributor
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works inbash
andzsh
.
– mosvy
4 hours ago
add a comment |
maybe you need a function
my_exec(){
print "foo"
}
this found for me,
countryip(){
COUNTY="$(whois $1 | grep ountry))"
echo "$COUNTRY $1 n"
}
$ countryip 192.168.0.1
New contributor
maybe you need a function
my_exec(){
print "foo"
}
this found for me,
countryip(){
COUNTY="$(whois $1 | grep ountry))"
echo "$COUNTRY $1 n"
}
$ countryip 192.168.0.1
New contributor
New contributor
answered 4 hours ago
Luis Enrique GastelumLuis Enrique Gastelum
261
261
New contributor
New contributor
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works inbash
andzsh
.
– mosvy
4 hours ago
add a comment |
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works inbash
andzsh
.
– mosvy
4 hours ago
1
1
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
Wow it worked actually ``` ./my_exec() { printf "foon" } ```
– HeyShafty
4 hours ago
@HeyShafty also
../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works in bash
and zsh
.– mosvy
4 hours ago
@HeyShafty also
../foo/bar(){ echo yeah; }; ../foo/bar
I think you should make your own answer with that -- notice however that it only works in bash
and zsh
.– mosvy
4 hours ago
add a comment |
$ BASH_ALIASES[./my_exec]='echo yes'
$ ./my_exec
yes
According to the bash manpage, you cannot use /
in an alias name:
The characters
/
,$
,`
, and=
and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
When defining an alias via the alias name=val
syntax, bash will refuse any alias name that contains any character defined by the regex:
[ tn&();<>|\"'`$/]
See the legal_alias_name()
function in its source code. Notice that the lack of =
above is not an omission; the impossibility of using it in an alias name is simply an artifact of the syntax.
But you can use some of those characters in an alias, by defining it indirectly via the BASH_ALIASES
array:
$ BASH_ALIASES['/a=$']='echo yes'; /a=$
yes
Alias names in the susv4 standard
3.10 Alias Name
In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set and any of the
following characters:!
,%
,,
,@
.
Implementations may allow other characters within alias names as an extension.
So both bash
and zsh
(which allows /
to be used in alias names directly) are within the standard.
Slashes and other funny chars in function names
In bash
and zsh
, a /
can be used directly in a function name:
$ /bin/sh(){ echo no bin/sh today; }
$ /bin/sh -c ls
no bin/sh today
This is a non-standard extension; in a standard shell, a function name can contain only ascii letters, digits and underscores, and cannot start with a digit.
In bash
, a function name can be made up of any characters except $
, with the condition that is doesn't contain only digits and within the constraints imposed by the function definition syntax. You can look at execute_intern_function()
and check_identifier()
for all the details.
In zsh
the all-digits constraint doesn't apply, and a function name can also be quoted/escaped in the definition:
zsh$ 666() echo "$0"; $() echo "$0"
zsh$ 666; $
666
$
add a comment |
$ BASH_ALIASES[./my_exec]='echo yes'
$ ./my_exec
yes
According to the bash manpage, you cannot use /
in an alias name:
The characters
/
,$
,`
, and=
and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
When defining an alias via the alias name=val
syntax, bash will refuse any alias name that contains any character defined by the regex:
[ tn&();<>|\"'`$/]
See the legal_alias_name()
function in its source code. Notice that the lack of =
above is not an omission; the impossibility of using it in an alias name is simply an artifact of the syntax.
But you can use some of those characters in an alias, by defining it indirectly via the BASH_ALIASES
array:
$ BASH_ALIASES['/a=$']='echo yes'; /a=$
yes
Alias names in the susv4 standard
3.10 Alias Name
In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set and any of the
following characters:!
,%
,,
,@
.
Implementations may allow other characters within alias names as an extension.
So both bash
and zsh
(which allows /
to be used in alias names directly) are within the standard.
Slashes and other funny chars in function names
In bash
and zsh
, a /
can be used directly in a function name:
$ /bin/sh(){ echo no bin/sh today; }
$ /bin/sh -c ls
no bin/sh today
This is a non-standard extension; in a standard shell, a function name can contain only ascii letters, digits and underscores, and cannot start with a digit.
In bash
, a function name can be made up of any characters except $
, with the condition that is doesn't contain only digits and within the constraints imposed by the function definition syntax. You can look at execute_intern_function()
and check_identifier()
for all the details.
In zsh
the all-digits constraint doesn't apply, and a function name can also be quoted/escaped in the definition:
zsh$ 666() echo "$0"; $() echo "$0"
zsh$ 666; $
666
$
add a comment |
$ BASH_ALIASES[./my_exec]='echo yes'
$ ./my_exec
yes
According to the bash manpage, you cannot use /
in an alias name:
The characters
/
,$
,`
, and=
and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
When defining an alias via the alias name=val
syntax, bash will refuse any alias name that contains any character defined by the regex:
[ tn&();<>|\"'`$/]
See the legal_alias_name()
function in its source code. Notice that the lack of =
above is not an omission; the impossibility of using it in an alias name is simply an artifact of the syntax.
But you can use some of those characters in an alias, by defining it indirectly via the BASH_ALIASES
array:
$ BASH_ALIASES['/a=$']='echo yes'; /a=$
yes
Alias names in the susv4 standard
3.10 Alias Name
In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set and any of the
following characters:!
,%
,,
,@
.
Implementations may allow other characters within alias names as an extension.
So both bash
and zsh
(which allows /
to be used in alias names directly) are within the standard.
Slashes and other funny chars in function names
In bash
and zsh
, a /
can be used directly in a function name:
$ /bin/sh(){ echo no bin/sh today; }
$ /bin/sh -c ls
no bin/sh today
This is a non-standard extension; in a standard shell, a function name can contain only ascii letters, digits and underscores, and cannot start with a digit.
In bash
, a function name can be made up of any characters except $
, with the condition that is doesn't contain only digits and within the constraints imposed by the function definition syntax. You can look at execute_intern_function()
and check_identifier()
for all the details.
In zsh
the all-digits constraint doesn't apply, and a function name can also be quoted/escaped in the definition:
zsh$ 666() echo "$0"; $() echo "$0"
zsh$ 666; $
666
$
$ BASH_ALIASES[./my_exec]='echo yes'
$ ./my_exec
yes
According to the bash manpage, you cannot use /
in an alias name:
The characters
/
,$
,`
, and=
and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
When defining an alias via the alias name=val
syntax, bash will refuse any alias name that contains any character defined by the regex:
[ tn&();<>|\"'`$/]
See the legal_alias_name()
function in its source code. Notice that the lack of =
above is not an omission; the impossibility of using it in an alias name is simply an artifact of the syntax.
But you can use some of those characters in an alias, by defining it indirectly via the BASH_ALIASES
array:
$ BASH_ALIASES['/a=$']='echo yes'; /a=$
yes
Alias names in the susv4 standard
3.10 Alias Name
In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set and any of the
following characters:!
,%
,,
,@
.
Implementations may allow other characters within alias names as an extension.
So both bash
and zsh
(which allows /
to be used in alias names directly) are within the standard.
Slashes and other funny chars in function names
In bash
and zsh
, a /
can be used directly in a function name:
$ /bin/sh(){ echo no bin/sh today; }
$ /bin/sh -c ls
no bin/sh today
This is a non-standard extension; in a standard shell, a function name can contain only ascii letters, digits and underscores, and cannot start with a digit.
In bash
, a function name can be made up of any characters except $
, with the condition that is doesn't contain only digits and within the constraints imposed by the function definition syntax. You can look at execute_intern_function()
and check_identifier()
for all the details.
In zsh
the all-digits constraint doesn't apply, and a function name can also be quoted/escaped in the definition:
zsh$ 666() echo "$0"; $() echo "$0"
zsh$ 666; $
666
$
edited 5 mins ago
answered 5 hours ago
mosvymosvy
9,94211236
9,94211236
add a comment |
add a comment |
The question here is that we are forgetting that
'./'
says to the
shell 'looks at this file, command is here in this directory that I am
now "current directory
" and here in this case it is not necessary
your presence because as we are seeing will occur a clear mistake! in
case you should declare thealias
normally just like any other alias
alias my_exec = 'echo "foo "'
here you will get a better result. OK!
add a comment |
The question here is that we are forgetting that
'./'
says to the
shell 'looks at this file, command is here in this directory that I am
now "current directory
" and here in this case it is not necessary
your presence because as we are seeing will occur a clear mistake! in
case you should declare thealias
normally just like any other alias
alias my_exec = 'echo "foo "'
here you will get a better result. OK!
add a comment |
The question here is that we are forgetting that
'./'
says to the
shell 'looks at this file, command is here in this directory that I am
now "current directory
" and here in this case it is not necessary
your presence because as we are seeing will occur a clear mistake! in
case you should declare thealias
normally just like any other alias
alias my_exec = 'echo "foo "'
here you will get a better result. OK!
The question here is that we are forgetting that
'./'
says to the
shell 'looks at this file, command is here in this directory that I am
now "current directory
" and here in this case it is not necessary
your presence because as we are seeing will occur a clear mistake! in
case you should declare thealias
normally just like any other alias
alias my_exec = 'echo "foo "'
here you will get a better result. OK!
answered 2 hours ago
Joke Sr. OKJoke Sr. OK
6191510
6191510
add a comment |
add a comment |
HeyShafty is a new contributor. Be nice, and check out our Code of Conduct.
HeyShafty is a new contributor. Be nice, and check out our Code of Conduct.
HeyShafty is a new contributor. Be nice, and check out our Code of Conduct.
HeyShafty is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512191%2fhow-can-i-make-an-alias-that-has-an-executables-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
You need to use a valid name, such as:
alias my_exec='printf "foo"'
. Or, is there some reason that you want the./
as part of the alias name?– John1024
5 hours ago
Yes, the
./
is necessary to me– HeyShafty
4 hours ago
And, the reason for that is? If you want people here to provide useful help, it would help if you explained why you want to do this.
– John1024
4 hours ago
1
Prank a friend, so that his ./my_exec outputs "Segmentation fault (Core dumped)" I have
zsh
, so he could prank me by doing it, I just want payback– HeyShafty
4 hours ago
@HeyShafty "Prank a friend". You need to think of better excuses when asking questions on SE.
– RonJohn
4 hours ago