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;








1















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?










share|improve this question






























    1















    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?










    share|improve this question


























      1












      1








      1








      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 14:51









      e.rsd

      285




      285










      asked Mar 27 at 12:28









      jwkjwk

      61




      61




















          3 Answers
          3






          active

          oldest

          votes


















          3














          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.






          share|improve this answer

























          • 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


















          1














          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 





          share|improve this answer




















          • 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



















          0














          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]





          share|improve this answer























          • But I don't think this is really what you're asking.

            – glenn jackman
            Mar 27 at 15:26











          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
          );



          );













          draft saved

          draft discarded


















          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









          3














          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.






          share|improve this answer

























          • 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















          3














          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.






          share|improve this answer

























          • 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













          3












          3








          3







          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.






          share|improve this answer















          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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

















          • 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













          1














          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 





          share|improve this answer




















          • 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
















          1














          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 





          share|improve this answer




















          • 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














          1












          1








          1







          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 





          share|improve this answer















          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 






          share|improve this answer














          share|improve this answer



          share|improve this answer








          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













          • 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












          0














          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]





          share|improve this answer























          • But I don't think this is really what you're asking.

            – glenn jackman
            Mar 27 at 15:26















          0














          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]





          share|improve this answer























          • But I don't think this is really what you're asking.

            – glenn jackman
            Mar 27 at 15:26













          0












          0








          0







          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]





          share|improve this answer













          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]






          share|improve this answer












          share|improve this answer



          share|improve this answer










          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

















          • 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

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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

          Popular posts from this blog

          Creating 100m^2 grid automatically using QGIS?Creating grid constrained within polygon in QGIS?Createing polygon layer from point data using QGIS?Creating vector grid using QGIS?Creating grid polygons from coordinates using R or PythonCreating grid from spatio temporal point data?Creating fields in attributes table using other layers using QGISCreate .shp vector grid in QGISQGIS Creating 4km point grid within polygonsCreate a vector grid over a raster layerVector Grid Creates just one grid

          Nikolai Prilezhaev Bibliography References External links Navigation menuEarly Russian Organic Chemists and Their Legacy092774english translationRussian Biography

          How to link a C library to an Assembly library on Mac with clangHow do you set, clear, and toggle a single bit?Find (and kill) process locking port 3000 on MacWho is listening on a given TCP port on Mac OS X?How to start PostgreSQL server on Mac OS X?Compile assembler in nasm on mac osHow do I install pip on macOS or OS X?AFNetworking 2.0 “_NSURLSessionTransferSizeUnknown” linking error on Mac OS X 10.8C++ code for testing the Collatz conjecture faster than hand-written assembly - why?How to link a NASM code and GCC in Mac OS X?How to run x86 .asm on macOS Sierra