How to convert an alias for bash to an alias for csh? -> Or to tclBash alias argumentsAlias for finding a file not working in bashStart bash with a specific alias setcsh: Convert aliases into commands that set thesecshell alias: How to use nested single quotes(') in in cshell aliashow to set alias of command in bash that contains both single and double qoutescreating alias for cmd with backticksWhy alias behave different than running bash command directly?bash alias rename function with argumentsA substitue for Bash aliases (something that behaves basically like an alias but isn't an alias)
A Journey Through Space and Time
Why CLRS example on residual networks does not follows its formula?
How to add power-LED to my small amplifier?
The use of multiple foreign keys on same column in SQL Server
Should I join office cleaning event for free?
Motorized valve interfering with button?
Schwarzchild Radius of the Universe
"which" command doesn't work / path of Safari?
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
declaring a variable twice in IIFE
Why Is Death Allowed In the Matrix?
Modification to Chariots for Heavy Cavalry Analogue for 4-armed race
How can the DM most effectively choose 1 out of an odd number of players to be targeted by an attack or effect?
Circuitry of TV splitters
Copycat chess is back
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
How is this relation reflexive?
A function which translates a sentence to title-case
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Is it possible to do 50 km distance without any previous training?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
How to convert an alias for bash to an alias for csh? -> Or to tcl
Bash alias argumentsAlias for finding a file not working in bashStart bash with a specific alias setcsh: Convert aliases into commands that set thesecshell alias: How to use nested single quotes(') in in cshell aliashow to set alias of command in bash that contains both single and double qoutescreating alias for cmd with backticksWhy alias behave different than running bash command directly?bash alias rename function with argumentsA substitue for Bash aliases (something that behaves basically like an alias but isn't an alias)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
alias s2st="ps -A | grep -E "a|b""
works for bash.
Then I tried to convert it for csh
:
set-alias t2st 'ps -A | grep -E "a|b"'
But csh does quoting so different, I couldn't coupe with...
How does it need to be, to be correct and working?
bash alias tcl
add a comment |
alias s2st="ps -A | grep -E "a|b""
works for bash.
Then I tried to convert it for csh
:
set-alias t2st 'ps -A | grep -E "a|b"'
But csh does quoting so different, I couldn't coupe with...
How does it need to be, to be correct and working?
bash alias tcl
add a comment |
alias s2st="ps -A | grep -E "a|b""
works for bash.
Then I tried to convert it for csh
:
set-alias t2st 'ps -A | grep -E "a|b"'
But csh does quoting so different, I couldn't coupe with...
How does it need to be, to be correct and working?
bash alias tcl
alias s2st="ps -A | grep -E "a|b""
works for bash.
Then I tried to convert it for csh
:
set-alias t2st 'ps -A | grep -E "a|b"'
But csh does quoting so different, I couldn't coupe with...
How does it need to be, to be correct and working?
bash alias tcl
bash alias tcl
edited Mar 27 at 14:51
e.rsd
285
285
asked Mar 27 at 12:28
jwkjwk
61
61
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
In bash
, that should be:
alias s2st='ps -A | grep -E "a|b"'
(alias s2st="ps -A | grep -E "a|b""
would not work in bash
, as the second "
would close the first "
so the second |
would not be quoted).
In csh
alias s2st 'ps -A | grep -E "a|b"'
Strong quotes in both bash
and csh
are '...'
. They are less strong in csh
though where !
and newline (and backslash when preceding those) are still special.
In TCL, strong quotes are ...
with the added benefit that and
can occur within them as long as they are matched.
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
add a comment |
Thanks to Stéphane Chazelas, I found my problem:
My alias is stored in a tcl script, so I need the correct tcl syntax, which is:
set-alias s2st ps -A
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
add a comment |
In Tcl I'd write
proc psgrep pattern
return [join [lsearch -regexp -inline -all [split [exec ps -A] n] $pattern] n]
set output [psgrep b]
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
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
);
);
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%2f508967%2fhow-to-convert-an-alias-for-bash-to-an-alias-for-csh-or-to-tcl%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
In bash
, that should be:
alias s2st='ps -A | grep -E "a|b"'
(alias s2st="ps -A | grep -E "a|b""
would not work in bash
, as the second "
would close the first "
so the second |
would not be quoted).
In csh
alias s2st 'ps -A | grep -E "a|b"'
Strong quotes in both bash
and csh
are '...'
. They are less strong in csh
though where !
and newline (and backslash when preceding those) are still special.
In TCL, strong quotes are ...
with the added benefit that and
can occur within them as long as they are matched.
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
add a comment |
In bash
, that should be:
alias s2st='ps -A | grep -E "a|b"'
(alias s2st="ps -A | grep -E "a|b""
would not work in bash
, as the second "
would close the first "
so the second |
would not be quoted).
In csh
alias s2st 'ps -A | grep -E "a|b"'
Strong quotes in both bash
and csh
are '...'
. They are less strong in csh
though where !
and newline (and backslash when preceding those) are still special.
In TCL, strong quotes are ...
with the added benefit that and
can occur within them as long as they are matched.
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
add a comment |
In bash
, that should be:
alias s2st='ps -A | grep -E "a|b"'
(alias s2st="ps -A | grep -E "a|b""
would not work in bash
, as the second "
would close the first "
so the second |
would not be quoted).
In csh
alias s2st 'ps -A | grep -E "a|b"'
Strong quotes in both bash
and csh
are '...'
. They are less strong in csh
though where !
and newline (and backslash when preceding those) are still special.
In TCL, strong quotes are ...
with the added benefit that and
can occur within them as long as they are matched.
In bash
, that should be:
alias s2st='ps -A | grep -E "a|b"'
(alias s2st="ps -A | grep -E "a|b""
would not work in bash
, as the second "
would close the first "
so the second |
would not be quoted).
In csh
alias s2st 'ps -A | grep -E "a|b"'
Strong quotes in both bash
and csh
are '...'
. They are less strong in csh
though where !
and newline (and backslash when preceding those) are still special.
In TCL, strong quotes are ...
with the added benefit that and
can occur within them as long as they are matched.
edited Mar 27 at 13:53
answered Mar 27 at 12:37
Stéphane ChazelasStéphane Chazelas
313k57593949
313k57593949
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
add a comment |
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
Thanks! Ok, then my problem isn't csh, but tcl, which I expected to use the same syntax. How should it look like for tcl?
– jwk
Mar 27 at 12:42
2
2
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
@jwk Your question does not mention tcl. Could you maybe update the question?
– Kusalananda♦
Mar 27 at 12:47
add a comment |
Thanks to Stéphane Chazelas, I found my problem:
My alias is stored in a tcl script, so I need the correct tcl syntax, which is:
set-alias s2st ps -A
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
add a comment |
Thanks to Stéphane Chazelas, I found my problem:
My alias is stored in a tcl script, so I need the correct tcl syntax, which is:
set-alias s2st ps -A
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
add a comment |
Thanks to Stéphane Chazelas, I found my problem:
My alias is stored in a tcl script, so I need the correct tcl syntax, which is:
set-alias s2st ps -A
Thanks to Stéphane Chazelas, I found my problem:
My alias is stored in a tcl script, so I need the correct tcl syntax, which is:
set-alias s2st ps -A
edited Mar 27 at 13:09
msp9011
4,58044167
4,58044167
answered Mar 27 at 13:02
e.rsde.rsd
285
285
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
add a comment |
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
2
2
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
For clarity, the question and answer would benefit from showing a bit more context around how you use the shell and tcl. At the moment, the tcl bit seems to be quite important even though it's barely mentioned in the question.
– Kusalananda♦
Mar 27 at 15:12
add a comment |
In Tcl I'd write
proc psgrep pattern
return [join [lsearch -regexp -inline -all [split [exec ps -A] n] $pattern] n]
set output [psgrep b]
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
add a comment |
In Tcl I'd write
proc psgrep pattern
return [join [lsearch -regexp -inline -all [split [exec ps -A] n] $pattern] n]
set output [psgrep b]
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
add a comment |
In Tcl I'd write
proc psgrep pattern
return [join [lsearch -regexp -inline -all [split [exec ps -A] n] $pattern] n]
set output [psgrep b]
In Tcl I'd write
proc psgrep pattern
return [join [lsearch -regexp -inline -all [split [exec ps -A] n] $pattern] n]
set output [psgrep b]
answered Mar 27 at 15:18
glenn jackmanglenn jackman
53k573114
53k573114
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
add a comment |
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
But I don't think this is really what you're asking.
– glenn jackman
Mar 27 at 15:26
add a comment |
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%2f508967%2fhow-to-convert-an-alias-for-bash-to-an-alias-for-csh-or-to-tcl%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
-alias, bash, tcl