Trouble understanding gsettings + xargs behaviour

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











up vote
0
down vote

favorite












To set the stage, I have this 2 equivalent and working 'xargs' composed commands, in this sample echo scenario:



// ok
$ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs echo
org.cinnamon.desktop.keybindings.wm move-to-workspace-5

// ok
$ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' echo ''
org.cinnamon.desktop.keybindings.wm move-to-workspace-5


Now, when I replace the 'echo' command with 'gsettings get' the second case fails:



// ok
$ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs gsettings get
['<Alt>F4']

// fails
$ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' gsettings get ''
Usage:
gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
SCHEMADIR A directory to search for additional schemas
SCHEMA The name of the schema
PATH The path, for relocatable schemas
KEY The key within the schema


What is going on and how can I get more visibility in the issue?










share|improve this question







New contributor




Ghiro 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

    favorite












    To set the stage, I have this 2 equivalent and working 'xargs' composed commands, in this sample echo scenario:



    // ok
    $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs echo
    org.cinnamon.desktop.keybindings.wm move-to-workspace-5

    // ok
    $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' echo ''
    org.cinnamon.desktop.keybindings.wm move-to-workspace-5


    Now, when I replace the 'echo' command with 'gsettings get' the second case fails:



    // ok
    $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs gsettings get
    ['<Alt>F4']

    // fails
    $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' gsettings get ''
    Usage:
    gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

    Get the value of KEY

    Arguments:
    SCHEMADIR A directory to search for additional schemas
    SCHEMA The name of the schema
    PATH The path, for relocatable schemas
    KEY The key within the schema


    What is going on and how can I get more visibility in the issue?










    share|improve this question







    New contributor




    Ghiro 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

      favorite









      up vote
      0
      down vote

      favorite











      To set the stage, I have this 2 equivalent and working 'xargs' composed commands, in this sample echo scenario:



      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs echo
      org.cinnamon.desktop.keybindings.wm move-to-workspace-5

      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' echo ''
      org.cinnamon.desktop.keybindings.wm move-to-workspace-5


      Now, when I replace the 'echo' command with 'gsettings get' the second case fails:



      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs gsettings get
      ['<Alt>F4']

      // fails
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' gsettings get ''
      Usage:
      gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

      Get the value of KEY

      Arguments:
      SCHEMADIR A directory to search for additional schemas
      SCHEMA The name of the schema
      PATH The path, for relocatable schemas
      KEY The key within the schema


      What is going on and how can I get more visibility in the issue?










      share|improve this question







      New contributor




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











      To set the stage, I have this 2 equivalent and working 'xargs' composed commands, in this sample echo scenario:



      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs echo
      org.cinnamon.desktop.keybindings.wm move-to-workspace-5

      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' echo ''
      org.cinnamon.desktop.keybindings.wm move-to-workspace-5


      Now, when I replace the 'echo' command with 'gsettings get' the second case fails:



      // ok
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs gsettings get
      ['<Alt>F4']

      // fails
      $ echo org.cinnamon.desktop.keybindings.wm move-to-workspace-5 | xargs -I '' gsettings get ''
      Usage:
      gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

      Get the value of KEY

      Arguments:
      SCHEMADIR A directory to search for additional schemas
      SCHEMA The name of the schema
      PATH The path, for relocatable schemas
      KEY The key within the schema


      What is going on and how can I get more visibility in the issue?







      xargs gsettings






      share|improve this question







      New contributor




      Ghiro 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 question







      New contributor




      Ghiro 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 question




      share|improve this question






      New contributor




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









      asked 24 mins ago









      Ghiro

      1




      1




      New contributor




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





      New contributor





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






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




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          The -I options of xargs will cause it to pass a whole line from the input as a single argument.



          This is what the manpage says:




          -I replace-str



          Replace occurrences of replace-str in the initial-arguments with
          names read from standard input. Also, unquoted blanks do not
          terminate input items; instead the separator is the newline
          character
          . Implies -x and -L 1.






          share




















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



            );






            Ghiro is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480230%2ftrouble-understanding-gsettings-xargs-behaviour%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            The -I options of xargs will cause it to pass a whole line from the input as a single argument.



            This is what the manpage says:




            -I replace-str



            Replace occurrences of replace-str in the initial-arguments with
            names read from standard input. Also, unquoted blanks do not
            terminate input items; instead the separator is the newline
            character
            . Implies -x and -L 1.






            share
























              up vote
              0
              down vote













              The -I options of xargs will cause it to pass a whole line from the input as a single argument.



              This is what the manpage says:




              -I replace-str



              Replace occurrences of replace-str in the initial-arguments with
              names read from standard input. Also, unquoted blanks do not
              terminate input items; instead the separator is the newline
              character
              . Implies -x and -L 1.






              share






















                up vote
                0
                down vote










                up vote
                0
                down vote









                The -I options of xargs will cause it to pass a whole line from the input as a single argument.



                This is what the manpage says:




                -I replace-str



                Replace occurrences of replace-str in the initial-arguments with
                names read from standard input. Also, unquoted blanks do not
                terminate input items; instead the separator is the newline
                character
                . Implies -x and -L 1.






                share












                The -I options of xargs will cause it to pass a whole line from the input as a single argument.



                This is what the manpage says:




                -I replace-str



                Replace occurrences of replace-str in the initial-arguments with
                names read from standard input. Also, unquoted blanks do not
                terminate input items; instead the separator is the newline
                character
                . Implies -x and -L 1.







                share











                share


                share










                answered 2 mins ago









                mosvy

                3,690120




                3,690120




















                    Ghiro is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    Ghiro is a new contributor. Be nice, and check out our Code of Conduct.












                    Ghiro is a new contributor. Be nice, and check out our Code of Conduct.











                    Ghiro is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480230%2ftrouble-understanding-gsettings-xargs-behaviour%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