Bash operator translation to fishHow do I create a GUI application launcher for xfce4-terminal with fish but...

Is Thieves' Cant a language?

Are there really no countries that protect Freedom of Speech as the United States does?

What was the intention with the Commodore 128?

How to get locks that are keyed alike?

Is it really Security Misconfiguration to show a version number?

Units of measurement, especially length, when body parts vary in size among races

What's the point of writing that I know will never be used or read?

Adding things to bunches of things vs multiplication

How do figure out how powerful I am, when my abilities far exceed my knowledge?

Airline power sockets shut down when I plug my computer in. How can I avoid that?

How would armour (and combat) change if the fighter didn't need to actually wear it?

What is the opposite of "hunger level"?

What modifiers are added to the attack and damage rolls of this unique longbow from Waterdeep: Dragon Heist?

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

Will some rockets really collapse under their own weight?

List, map function based on a condition

Unconventional examples of mathematical modelling

What can I do to increase the amount of LEDs I can power with a pro micro?

Why do my bicycle brakes get worse and feel more 'squishy" over time?

The more + the + comparative degree

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

How to gracefully leave a company you helped start?

Why did IBM make the PC BIOS source code public?

Sums of binomial coefficients weighted by incomplete gamma



Bash operator translation to fish


How do I create a GUI application launcher for xfce4-terminal with fish but inheriting the environment variables from bash?Run a command only if the previous command was successful in Fish (like && in bash)how to bind a command when fish shell is startedFish shell testing for existence of file in $PATHStart bash then autostart fish with terminatorUsing ~/.dircolors in fish shellIs $argv in fish shell different from $@ in bash?Set default interpreter in fish shell






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I've been trying to learn to use jq and for bash it uses the <<< operator which I cannot understand after reading the bash documentation, what is this operator for?



Besides that, I use the fish shell instead. How can I translate jq . <<< '{"some": "xyz"}' (works in bash) to the fish shell?










share|improve this question

































    3















    I've been trying to learn to use jq and for bash it uses the <<< operator which I cannot understand after reading the bash documentation, what is this operator for?



    Besides that, I use the fish shell instead. How can I translate jq . <<< '{"some": "xyz"}' (works in bash) to the fish shell?










    share|improve this question





























      3












      3








      3








      I've been trying to learn to use jq and for bash it uses the <<< operator which I cannot understand after reading the bash documentation, what is this operator for?



      Besides that, I use the fish shell instead. How can I translate jq . <<< '{"some": "xyz"}' (works in bash) to the fish shell?










      share|improve this question
















      I've been trying to learn to use jq and for bash it uses the <<< operator which I cannot understand after reading the bash documentation, what is this operator for?



      Besides that, I use the fish shell instead. How can I translate jq . <<< '{"some": "xyz"}' (works in bash) to the fish shell?







      bash io-redirection fish






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Jeff Schaller

      49k11 gold badges72 silver badges162 bronze badges




      49k11 gold badges72 silver badges162 bronze badges










      asked Jul 6 '18 at 14:48









      sant016sant016

      281 silver badge5 bronze badges




      281 silver badge5 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          4














          The <<< operator is a here-string



          3.6.7 Here Strings



          Given:



          [n]<<< word



          The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).




          To translate this to fish shell you could likely do:



          echo '{"some": "xyz"}' | jq


          (which would work in bash as well)






          share|improve this answer



































            0















            jq can accept text input as well, but by default, jq reads a stream of JSON entities [...] from stdin.




            Therefore, you can type the input interactively using the keyboard. Use Ctrl+d to terminate the input (see also this explanation on SO). The main drawback is that you cannot use the usual keys e.g. , , Ctrl+a.



            prompt% jq -r '.[] | [ .string, .number|tostring ] | join(": ")' -
            [{ "number": 9, "string": "nine"},
            { "number": 4, "string": "four"}]
            nine: 9
            four: 4
            prompt%


            Note: the command line comes from this SO answer.






            share|improve this answer






























              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%2f453874%2fbash-operator-translation-to-fish%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              The <<< operator is a here-string



              3.6.7 Here Strings



              Given:



              [n]<<< word



              The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).




              To translate this to fish shell you could likely do:



              echo '{"some": "xyz"}' | jq


              (which would work in bash as well)






              share|improve this answer
































                4














                The <<< operator is a here-string



                3.6.7 Here Strings



                Given:



                [n]<<< word



                The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).




                To translate this to fish shell you could likely do:



                echo '{"some": "xyz"}' | jq


                (which would work in bash as well)






                share|improve this answer






























                  4












                  4








                  4







                  The <<< operator is a here-string



                  3.6.7 Here Strings



                  Given:



                  [n]<<< word



                  The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).




                  To translate this to fish shell you could likely do:



                  echo '{"some": "xyz"}' | jq


                  (which would work in bash as well)






                  share|improve this answer















                  The <<< operator is a here-string



                  3.6.7 Here Strings



                  Given:



                  [n]<<< word



                  The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The result is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor n if n is specified).




                  To translate this to fish shell you could likely do:



                  echo '{"some": "xyz"}' | jq


                  (which would work in bash as well)







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited yesterday









                  Kusalananda

                  160k18 gold badges316 silver badges502 bronze badges




                  160k18 gold badges316 silver badges502 bronze badges










                  answered Jul 6 '18 at 14:55









                  Jesse_bJesse_b

                  18.7k3 gold badges46 silver badges86 bronze badges




                  18.7k3 gold badges46 silver badges86 bronze badges




























                      0















                      jq can accept text input as well, but by default, jq reads a stream of JSON entities [...] from stdin.




                      Therefore, you can type the input interactively using the keyboard. Use Ctrl+d to terminate the input (see also this explanation on SO). The main drawback is that you cannot use the usual keys e.g. , , Ctrl+a.



                      prompt% jq -r '.[] | [ .string, .number|tostring ] | join(": ")' -
                      [{ "number": 9, "string": "nine"},
                      { "number": 4, "string": "four"}]
                      nine: 9
                      four: 4
                      prompt%


                      Note: the command line comes from this SO answer.






                      share|improve this answer
































                        0















                        jq can accept text input as well, but by default, jq reads a stream of JSON entities [...] from stdin.




                        Therefore, you can type the input interactively using the keyboard. Use Ctrl+d to terminate the input (see also this explanation on SO). The main drawback is that you cannot use the usual keys e.g. , , Ctrl+a.



                        prompt% jq -r '.[] | [ .string, .number|tostring ] | join(": ")' -
                        [{ "number": 9, "string": "nine"},
                        { "number": 4, "string": "four"}]
                        nine: 9
                        four: 4
                        prompt%


                        Note: the command line comes from this SO answer.






                        share|improve this answer






























                          0












                          0








                          0








                          jq can accept text input as well, but by default, jq reads a stream of JSON entities [...] from stdin.




                          Therefore, you can type the input interactively using the keyboard. Use Ctrl+d to terminate the input (see also this explanation on SO). The main drawback is that you cannot use the usual keys e.g. , , Ctrl+a.



                          prompt% jq -r '.[] | [ .string, .number|tostring ] | join(": ")' -
                          [{ "number": 9, "string": "nine"},
                          { "number": 4, "string": "four"}]
                          nine: 9
                          four: 4
                          prompt%


                          Note: the command line comes from this SO answer.






                          share|improve this answer
















                          jq can accept text input as well, but by default, jq reads a stream of JSON entities [...] from stdin.




                          Therefore, you can type the input interactively using the keyboard. Use Ctrl+d to terminate the input (see also this explanation on SO). The main drawback is that you cannot use the usual keys e.g. , , Ctrl+a.



                          prompt% jq -r '.[] | [ .string, .number|tostring ] | join(": ")' -
                          [{ "number": 9, "string": "nine"},
                          { "number": 4, "string": "four"}]
                          nine: 9
                          four: 4
                          prompt%


                          Note: the command line comes from this SO answer.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited yesterday

























                          answered yesterday









                          FólkvangrFólkvangr

                          3702 silver badges14 bronze badges




                          3702 silver badges14 bronze badges

































                              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%2f453874%2fbash-operator-translation-to-fish%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







                              Popular posts from this blog

                              Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                              Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                              Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...