Why can't I pipe `pwd` to `open` on macOS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
12
down vote

favorite












This is macOS specific, but seems too unixy to go in the Ask Different community.



In Terminal, I can pwd, copy the result, and type open and paste the result and the folder will open in the Finder, but



pwd | open


prints the help documentation for open. Why doesn't piping work but pasting does?










share|improve this question























  • that will only work if open expects you to type the directory name after you press enter.
    – Jasen
    Jul 23 '16 at 4:32






  • 8




    Also, this should (not a mac user) work: open . (for the current directory)
    – UniversallyUniqueID
    Jul 23 '16 at 10:44










  • @BharadwajRaju open . works and does seem the easiest. ty.
    – Chuck
    Jul 23 '16 at 13:00















up vote
12
down vote

favorite












This is macOS specific, but seems too unixy to go in the Ask Different community.



In Terminal, I can pwd, copy the result, and type open and paste the result and the folder will open in the Finder, but



pwd | open


prints the help documentation for open. Why doesn't piping work but pasting does?










share|improve this question























  • that will only work if open expects you to type the directory name after you press enter.
    – Jasen
    Jul 23 '16 at 4:32






  • 8




    Also, this should (not a mac user) work: open . (for the current directory)
    – UniversallyUniqueID
    Jul 23 '16 at 10:44










  • @BharadwajRaju open . works and does seem the easiest. ty.
    – Chuck
    Jul 23 '16 at 13:00













up vote
12
down vote

favorite









up vote
12
down vote

favorite











This is macOS specific, but seems too unixy to go in the Ask Different community.



In Terminal, I can pwd, copy the result, and type open and paste the result and the folder will open in the Finder, but



pwd | open


prints the help documentation for open. Why doesn't piping work but pasting does?










share|improve this question















This is macOS specific, but seems too unixy to go in the Ask Different community.



In Terminal, I can pwd, copy the result, and type open and paste the result and the folder will open in the Finder, but



pwd | open


prints the help documentation for open. Why doesn't piping work but pasting does?







osx pipe






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:45









Community♦

1




1










asked Jul 23 '16 at 4:04









Chuck

255111




255111











  • that will only work if open expects you to type the directory name after you press enter.
    – Jasen
    Jul 23 '16 at 4:32






  • 8




    Also, this should (not a mac user) work: open . (for the current directory)
    – UniversallyUniqueID
    Jul 23 '16 at 10:44










  • @BharadwajRaju open . works and does seem the easiest. ty.
    – Chuck
    Jul 23 '16 at 13:00

















  • that will only work if open expects you to type the directory name after you press enter.
    – Jasen
    Jul 23 '16 at 4:32






  • 8




    Also, this should (not a mac user) work: open . (for the current directory)
    – UniversallyUniqueID
    Jul 23 '16 at 10:44










  • @BharadwajRaju open . works and does seem the easiest. ty.
    – Chuck
    Jul 23 '16 at 13:00
















that will only work if open expects you to type the directory name after you press enter.
– Jasen
Jul 23 '16 at 4:32




that will only work if open expects you to type the directory name after you press enter.
– Jasen
Jul 23 '16 at 4:32




8




8




Also, this should (not a mac user) work: open . (for the current directory)
– UniversallyUniqueID
Jul 23 '16 at 10:44




Also, this should (not a mac user) work: open . (for the current directory)
– UniversallyUniqueID
Jul 23 '16 at 10:44












@BharadwajRaju open . works and does seem the easiest. ty.
– Chuck
Jul 23 '16 at 13:00





@BharadwajRaju open . works and does seem the easiest. ty.
– Chuck
Jul 23 '16 at 13:00











5 Answers
5






active

oldest

votes

















up vote
19
down vote



accepted










I don't have a Mac so I can't test it, but the solution should be something like:



open "`pwd`"


Not all programs take their input from stdin which would be necessary for the pipe to work.






share|improve this answer


















  • 1




    The double quotes are unnecessary.
    – tbodt
    Jul 23 '16 at 18:50







  • 3




    @tbodt: Try it in /var/tbodt's files.
    – Julie Pelletier
    Jul 23 '16 at 19:00











  • I would have thought bash would treat that as one argument... This is why I don't use bash.
    – tbodt
    Jul 23 '16 at 19:04






  • 2




    @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
    – Julie Pelletier
    Jul 23 '16 at 19:06







  • 2




    @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
    – Julie Pelletier
    Jul 23 '16 at 19:34

















up vote
26
down vote













The open utility on Mac does not read from standard input, but take its arguments from the command line.



To open the current working directory, you would have to say



$ open "$( pwd )"


or



$ open "$PWD"


or simply



$ open .


as pointed out in the comments below.



With the -f flag, open can be made to read from standard input, but only to open whatever it receives in the default text editor.






share|improve this answer


















  • 1




    If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
    – Stéphane Chazelas
    Jul 23 '16 at 7:46






  • 1




    @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
    – Kusalananda
    Jul 23 '16 at 7:55










  • For completeness, with rc, es, akanga shells: open `pwd or open `pwd
    – Stéphane Chazelas
    Jul 23 '16 at 10:19






  • 4




    Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
    – fd0
    Jul 23 '16 at 10:46










  • @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
    – G-Man
    Jul 24 '16 at 2:18

















up vote
10
down vote













The other answers are totally correct. If you want an easy shorthand, you can do as @fd0 proposed, and just use



open .


to open the current directory. The current directory is named . (a single dot) in Unix, the parent directory .. (two dots).






share|improve this answer





























    up vote
    6
    down vote













    pwd | xargs open


    xargs shoves its standart input into the arguments of its first argument.






    share|improve this answer
















    • 1




      That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
      – Stéphane Chazelas
      Jul 24 '16 at 4:06

















    up vote
    0
    down vote













    You can use a pipeline with -f to open the content of the previous command in a Text Editor. This just applies for text editors. For other apps you'll need to use the suggestion in the other questions.



    For example:



    ls | open -f


    This would open your default text editor with the ls output content.



    You can also specify the text editor to use using -a:



    ls | open -a 'Atom' -f


    This would open Atom with the ls output content.






    share|improve this answer








    New contributor




    Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

















      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',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      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%2f297729%2fwhy-cant-i-pipe-pwd-to-open-on-macos%23new-answer', 'question_page');

      );

      Post as a guest






























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      19
      down vote



      accepted










      I don't have a Mac so I can't test it, but the solution should be something like:



      open "`pwd`"


      Not all programs take their input from stdin which would be necessary for the pipe to work.






      share|improve this answer


















      • 1




        The double quotes are unnecessary.
        – tbodt
        Jul 23 '16 at 18:50







      • 3




        @tbodt: Try it in /var/tbodt's files.
        – Julie Pelletier
        Jul 23 '16 at 19:00











      • I would have thought bash would treat that as one argument... This is why I don't use bash.
        – tbodt
        Jul 23 '16 at 19:04






      • 2




        @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
        – Julie Pelletier
        Jul 23 '16 at 19:06







      • 2




        @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
        – Julie Pelletier
        Jul 23 '16 at 19:34














      up vote
      19
      down vote



      accepted










      I don't have a Mac so I can't test it, but the solution should be something like:



      open "`pwd`"


      Not all programs take their input from stdin which would be necessary for the pipe to work.






      share|improve this answer


















      • 1




        The double quotes are unnecessary.
        – tbodt
        Jul 23 '16 at 18:50







      • 3




        @tbodt: Try it in /var/tbodt's files.
        – Julie Pelletier
        Jul 23 '16 at 19:00











      • I would have thought bash would treat that as one argument... This is why I don't use bash.
        – tbodt
        Jul 23 '16 at 19:04






      • 2




        @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
        – Julie Pelletier
        Jul 23 '16 at 19:06







      • 2




        @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
        – Julie Pelletier
        Jul 23 '16 at 19:34












      up vote
      19
      down vote



      accepted







      up vote
      19
      down vote



      accepted






      I don't have a Mac so I can't test it, but the solution should be something like:



      open "`pwd`"


      Not all programs take their input from stdin which would be necessary for the pipe to work.






      share|improve this answer














      I don't have a Mac so I can't test it, but the solution should be something like:



      open "`pwd`"


      Not all programs take their input from stdin which would be necessary for the pipe to work.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 23 '16 at 7:39

























      answered Jul 23 '16 at 4:08









      Julie Pelletier

      6,91211239




      6,91211239







      • 1




        The double quotes are unnecessary.
        – tbodt
        Jul 23 '16 at 18:50







      • 3




        @tbodt: Try it in /var/tbodt's files.
        – Julie Pelletier
        Jul 23 '16 at 19:00











      • I would have thought bash would treat that as one argument... This is why I don't use bash.
        – tbodt
        Jul 23 '16 at 19:04






      • 2




        @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
        – Julie Pelletier
        Jul 23 '16 at 19:06







      • 2




        @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
        – Julie Pelletier
        Jul 23 '16 at 19:34












      • 1




        The double quotes are unnecessary.
        – tbodt
        Jul 23 '16 at 18:50







      • 3




        @tbodt: Try it in /var/tbodt's files.
        – Julie Pelletier
        Jul 23 '16 at 19:00











      • I would have thought bash would treat that as one argument... This is why I don't use bash.
        – tbodt
        Jul 23 '16 at 19:04






      • 2




        @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
        – Julie Pelletier
        Jul 23 '16 at 19:06







      • 2




        @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
        – Julie Pelletier
        Jul 23 '16 at 19:34







      1




      1




      The double quotes are unnecessary.
      – tbodt
      Jul 23 '16 at 18:50





      The double quotes are unnecessary.
      – tbodt
      Jul 23 '16 at 18:50





      3




      3




      @tbodt: Try it in /var/tbodt's files.
      – Julie Pelletier
      Jul 23 '16 at 19:00





      @tbodt: Try it in /var/tbodt's files.
      – Julie Pelletier
      Jul 23 '16 at 19:00













      I would have thought bash would treat that as one argument... This is why I don't use bash.
      – tbodt
      Jul 23 '16 at 19:04




      I would have thought bash would treat that as one argument... This is why I don't use bash.
      – tbodt
      Jul 23 '16 at 19:04




      2




      2




      @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
      – Julie Pelletier
      Jul 23 '16 at 19:06





      @tbodt: How would any shell know if the space used is to separate arguments or part of an argument?
      – Julie Pelletier
      Jul 23 '16 at 19:06





      2




      2




      @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
      – Julie Pelletier
      Jul 23 '16 at 19:34




      @jamesdlin: Go complain on the bash development project, but don't forget to also go bash all older shells and most newer shells while you're at it. Over and out!
      – Julie Pelletier
      Jul 23 '16 at 19:34












      up vote
      26
      down vote













      The open utility on Mac does not read from standard input, but take its arguments from the command line.



      To open the current working directory, you would have to say



      $ open "$( pwd )"


      or



      $ open "$PWD"


      or simply



      $ open .


      as pointed out in the comments below.



      With the -f flag, open can be made to read from standard input, but only to open whatever it receives in the default text editor.






      share|improve this answer


















      • 1




        If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
        – Stéphane Chazelas
        Jul 23 '16 at 7:46






      • 1




        @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
        – Kusalananda
        Jul 23 '16 at 7:55










      • For completeness, with rc, es, akanga shells: open `pwd or open `pwd
        – Stéphane Chazelas
        Jul 23 '16 at 10:19






      • 4




        Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
        – fd0
        Jul 23 '16 at 10:46










      • @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
        – G-Man
        Jul 24 '16 at 2:18














      up vote
      26
      down vote













      The open utility on Mac does not read from standard input, but take its arguments from the command line.



      To open the current working directory, you would have to say



      $ open "$( pwd )"


      or



      $ open "$PWD"


      or simply



      $ open .


      as pointed out in the comments below.



      With the -f flag, open can be made to read from standard input, but only to open whatever it receives in the default text editor.






      share|improve this answer


















      • 1




        If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
        – Stéphane Chazelas
        Jul 23 '16 at 7:46






      • 1




        @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
        – Kusalananda
        Jul 23 '16 at 7:55










      • For completeness, with rc, es, akanga shells: open `pwd or open `pwd
        – Stéphane Chazelas
        Jul 23 '16 at 10:19






      • 4




        Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
        – fd0
        Jul 23 '16 at 10:46










      • @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
        – G-Man
        Jul 24 '16 at 2:18












      up vote
      26
      down vote










      up vote
      26
      down vote









      The open utility on Mac does not read from standard input, but take its arguments from the command line.



      To open the current working directory, you would have to say



      $ open "$( pwd )"


      or



      $ open "$PWD"


      or simply



      $ open .


      as pointed out in the comments below.



      With the -f flag, open can be made to read from standard input, but only to open whatever it receives in the default text editor.






      share|improve this answer














      The open utility on Mac does not read from standard input, but take its arguments from the command line.



      To open the current working directory, you would have to say



      $ open "$( pwd )"


      or



      $ open "$PWD"


      or simply



      $ open .


      as pointed out in the comments below.



      With the -f flag, open can be made to read from standard input, but only to open whatever it receives in the default text editor.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 23 '16 at 11:48

























      answered Jul 23 '16 at 6:15









      Kusalananda

      109k14211334




      109k14211334







      • 1




        If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
        – Stéphane Chazelas
        Jul 23 '16 at 7:46






      • 1




        @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
        – Kusalananda
        Jul 23 '16 at 7:55










      • For completeness, with rc, es, akanga shells: open `pwd or open `pwd
        – Stéphane Chazelas
        Jul 23 '16 at 10:19






      • 4




        Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
        – fd0
        Jul 23 '16 at 10:46










      • @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
        – G-Man
        Jul 24 '16 at 2:18












      • 1




        If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
        – Stéphane Chazelas
        Jul 23 '16 at 7:46






      • 1




        @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
        – Kusalananda
        Jul 23 '16 at 7:55










      • For completeness, with rc, es, akanga shells: open `pwd or open `pwd
        – Stéphane Chazelas
        Jul 23 '16 at 10:19






      • 4




        Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
        – fd0
        Jul 23 '16 at 10:46










      • @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
        – G-Man
        Jul 24 '16 at 2:18







      1




      1




      If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
      – Stéphane Chazelas
      Jul 23 '16 at 7:46




      If the shell is (t)csh, you'd want open $cwd:q instead. And open (pwd) /open $PWD if it's fish
      – Stéphane Chazelas
      Jul 23 '16 at 7:46




      1




      1




      @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
      – Kusalananda
      Jul 23 '16 at 7:55




      @StéphaneChazelas I believe the default shell on Darwin is bash, but it's always good to see solutions for other shells too.
      – Kusalananda
      Jul 23 '16 at 7:55












      For completeness, with rc, es, akanga shells: open `pwd or open `pwd
      – Stéphane Chazelas
      Jul 23 '16 at 10:19




      For completeness, with rc, es, akanga shells: open `pwd or open `pwd
      – Stéphane Chazelas
      Jul 23 '16 at 10:19




      4




      4




      Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
      – fd0
      Jul 23 '16 at 10:46




      Or you can use the syntax- open . for the current working directory or the parent directory open .. or up two directories open ../.. and so forth.
      – fd0
      Jul 23 '16 at 10:46












      @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
      – G-Man
      Jul 24 '16 at 2:18




      @StéphaneChazelas: Why would $cwd:q be preferable to "$cwd" in a csh-related shell?
      – G-Man
      Jul 24 '16 at 2:18










      up vote
      10
      down vote













      The other answers are totally correct. If you want an easy shorthand, you can do as @fd0 proposed, and just use



      open .


      to open the current directory. The current directory is named . (a single dot) in Unix, the parent directory .. (two dots).






      share|improve this answer


























        up vote
        10
        down vote













        The other answers are totally correct. If you want an easy shorthand, you can do as @fd0 proposed, and just use



        open .


        to open the current directory. The current directory is named . (a single dot) in Unix, the parent directory .. (two dots).






        share|improve this answer
























          up vote
          10
          down vote










          up vote
          10
          down vote









          The other answers are totally correct. If you want an easy shorthand, you can do as @fd0 proposed, and just use



          open .


          to open the current directory. The current directory is named . (a single dot) in Unix, the parent directory .. (two dots).






          share|improve this answer














          The other answers are totally correct. If you want an easy shorthand, you can do as @fd0 proposed, and just use



          open .


          to open the current directory. The current directory is named . (a single dot) in Unix, the parent directory .. (two dots).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:36









          Community♦

          1




          1










          answered Jul 23 '16 at 10:57









          serv-inc

          404212




          404212




















              up vote
              6
              down vote













              pwd | xargs open


              xargs shoves its standart input into the arguments of its first argument.






              share|improve this answer
















              • 1




                That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
                – Stéphane Chazelas
                Jul 24 '16 at 4:06














              up vote
              6
              down vote













              pwd | xargs open


              xargs shoves its standart input into the arguments of its first argument.






              share|improve this answer
















              • 1




                That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
                – Stéphane Chazelas
                Jul 24 '16 at 4:06












              up vote
              6
              down vote










              up vote
              6
              down vote









              pwd | xargs open


              xargs shoves its standart input into the arguments of its first argument.






              share|improve this answer












              pwd | xargs open


              xargs shoves its standart input into the arguments of its first argument.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 23 '16 at 20:52









              dbanet

              1245




              1245







              • 1




                That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
                – Stéphane Chazelas
                Jul 24 '16 at 4:06












              • 1




                That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
                – Stéphane Chazelas
                Jul 24 '16 at 4:06







              1




              1




              That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
              – Stéphane Chazelas
              Jul 24 '16 at 4:06




              That's only if the current working directory path doesn't contain blanks or newline or single quotes or double quotes or backslashes.
              – Stéphane Chazelas
              Jul 24 '16 at 4:06










              up vote
              0
              down vote













              You can use a pipeline with -f to open the content of the previous command in a Text Editor. This just applies for text editors. For other apps you'll need to use the suggestion in the other questions.



              For example:



              ls | open -f


              This would open your default text editor with the ls output content.



              You can also specify the text editor to use using -a:



              ls | open -a 'Atom' -f


              This would open Atom with the ls output content.






              share|improve this answer








              New contributor




              Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                up vote
                0
                down vote













                You can use a pipeline with -f to open the content of the previous command in a Text Editor. This just applies for text editors. For other apps you'll need to use the suggestion in the other questions.



                For example:



                ls | open -f


                This would open your default text editor with the ls output content.



                You can also specify the text editor to use using -a:



                ls | open -a 'Atom' -f


                This would open Atom with the ls output content.






                share|improve this answer








                New contributor




                Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  You can use a pipeline with -f to open the content of the previous command in a Text Editor. This just applies for text editors. For other apps you'll need to use the suggestion in the other questions.



                  For example:



                  ls | open -f


                  This would open your default text editor with the ls output content.



                  You can also specify the text editor to use using -a:



                  ls | open -a 'Atom' -f


                  This would open Atom with the ls output content.






                  share|improve this answer








                  New contributor




                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  You can use a pipeline with -f to open the content of the previous command in a Text Editor. This just applies for text editors. For other apps you'll need to use the suggestion in the other questions.



                  For example:



                  ls | open -f


                  This would open your default text editor with the ls output content.



                  You can also specify the text editor to use using -a:



                  ls | open -a 'Atom' -f


                  This would open Atom with the ls output content.







                  share|improve this answer








                  New contributor




                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 10 hours ago









                  Pau Chorro

                  1012




                  1012




                  New contributor




                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Pau Chorro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f297729%2fwhy-cant-i-pipe-pwd-to-open-on-macos%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay