Why 'xargs bash -c' is far slower than 'xargs sh -c'? [duplicate]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
This question already has an answer here:
What is the point of sh being linked to dash?
4 answers
What is the difference between #!/bin/sh and #!/bin/bash?
4 answers
time seq 100 | xargs -i bash -c 'echo {}'
; 2.530s
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223s
why?
PS: The title of mine for this post is more intuitive to be discovered or searched by google or any sort of search engines.
bash sh dash-shell
marked as duplicate by Melebius, karel, Kulfy, dessert, Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Feb 11 at 10:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
What is the point of sh being linked to dash?
4 answers
What is the difference between #!/bin/sh and #!/bin/bash?
4 answers
time seq 100 | xargs -i bash -c 'echo {}'
; 2.530s
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223s
why?
PS: The title of mine for this post is more intuitive to be discovered or searched by google or any sort of search engines.
bash sh dash-shell
marked as duplicate by Melebius, karel, Kulfy, dessert, Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Feb 11 at 10:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
The short answer is becauseshis symlink to/bin/dash, which is different from/bin/bash, and/bin/shsymlinked to/bin/dashexactly because it's considerably faster shell
– Sergiy Kolodyazhnyy
Feb 11 at 10:24
add a comment |
This question already has an answer here:
What is the point of sh being linked to dash?
4 answers
What is the difference between #!/bin/sh and #!/bin/bash?
4 answers
time seq 100 | xargs -i bash -c 'echo {}'
; 2.530s
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223s
why?
PS: The title of mine for this post is more intuitive to be discovered or searched by google or any sort of search engines.
bash sh dash-shell
This question already has an answer here:
What is the point of sh being linked to dash?
4 answers
What is the difference between #!/bin/sh and #!/bin/bash?
4 answers
time seq 100 | xargs -i bash -c 'echo {}'
; 2.530s
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223s
why?
PS: The title of mine for this post is more intuitive to be discovered or searched by google or any sort of search engines.
This question already has an answer here:
What is the point of sh being linked to dash?
4 answers
What is the difference between #!/bin/sh and #!/bin/bash?
4 answers
bash sh dash-shell
bash sh dash-shell
edited Feb 11 at 10:06
dessert
25.5k674108
25.5k674108
asked Feb 11 at 9:09
user58029user58029
715
715
marked as duplicate by Melebius, karel, Kulfy, dessert, Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Feb 11 at 10:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Melebius, karel, Kulfy, dessert, Sergiy Kolodyazhnyy
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Feb 11 at 10:21
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
The short answer is becauseshis symlink to/bin/dash, which is different from/bin/bash, and/bin/shsymlinked to/bin/dashexactly because it's considerably faster shell
– Sergiy Kolodyazhnyy
Feb 11 at 10:24
add a comment |
3
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
The short answer is becauseshis symlink to/bin/dash, which is different from/bin/bash, and/bin/shsymlinked to/bin/dashexactly because it's considerably faster shell
– Sergiy Kolodyazhnyy
Feb 11 at 10:24
3
3
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
The short answer is because
sh is symlink to /bin/dash, which is different from /bin/bash, and /bin/sh symlinked to /bin/dash exactly because it's considerably faster shell– Sergiy Kolodyazhnyy
Feb 11 at 10:24
The short answer is because
sh is symlink to /bin/dash, which is different from /bin/bash, and /bin/sh symlinked to /bin/dash exactly because it's considerably faster shell– Sergiy Kolodyazhnyy
Feb 11 at 10:24
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
3
Related: What is the point of sh being linked to dash?. Your actual question would be like: "Why bash is slower than sh"?
– Kulfy
Feb 11 at 9:16
The short answer is because
shis symlink to/bin/dash, which is different from/bin/bash, and/bin/shsymlinked to/bin/dashexactly because it's considerably faster shell– Sergiy Kolodyazhnyy
Feb 11 at 10:24