Trouble understanding gsettings + xargs behaviour
Clash 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?
xargs gsettings
New contributor
add a comment |Â
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?
xargs gsettings
New contributor
add a comment |Â
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?
xargs gsettings
New contributor
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
xargs gsettings
New contributor
New contributor
New contributor
asked 24 mins ago
Ghiro
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered 2 mins ago
mosvy
3,690120
3,690120
add a comment |Â
add a comment |Â
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.
Ghiro is a new contributor. Be nice, and check out our Code of Conduct.
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
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
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
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
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