src/parallel: LANG=C so uptime prints X.XX not X,XX. $/=undef so -d : works.

This commit is contained in:
Ole Tange 2012-04-05 13:31:22 +02:00
parent c79c32532b
commit 27c776acb5
2 changed files with 7 additions and 12 deletions

View file

@ -171,9 +171,9 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
Jesse Alama <jesse.alama@gmail.com>
Subject: GNU Parallel 20120322 ('#518696') released
Subject: GNU Parallel 20120422 ('') released
GNU Parallel 20120322 ('#518696') has been released. It is
GNU Parallel 20120422 ('') has been released. It is
available for download at: http://ftp.gnu.org/gnu/parallel/
This is a bugfix release with no new features. Probably a good release
@ -181,14 +181,8 @@ for stable long-term use.
New in this release:
* Parallel Process Database Dumps.
http://blog.mattoates.co.uk/2012/02/parallel-process-database-dumps.html
* Using GNU Parallel to process images from Mars.
http://lunokhod.org/?p=468
* Using GNU Parallel with bzgrep.
http://filip.rembialkowski.net/did-you-know-gnu-parallel/
* Blog post: GNU parallel - the best thing since sliced bread.
https://arrayal.wordpress.com/2012/03/27/gnu-parallel-the-best-thing-since-sliced-bread/
* Bug fixes and man page updates.

View file

@ -2222,6 +2222,7 @@ sub loadavg {
my $update_loadavg_file = 0;
if(-r $self->{'loadavg_file'}) {
open(UPTIME,"<".$self->{'loadavg_file'}) || ::die_bug("loadavg_file-r");
local $/ = undef;
my $uptime_out = <UPTIME>;
close UPTIME;
# load average: 0.76, 1.53, 1.45
@ -2249,9 +2250,9 @@ sub loadavg {
-e $ENV{'HOME'}."/.parallel/tmp" or mkdir $ENV{'HOME'}."/.parallel/tmp";
my $uptime;
if($self->{'string'} eq ":") {
$uptime = "uptime";
$uptime = "LANG=C uptime";
} else {
$uptime = $self->sshcommand() . " " . $self->serverlogin() . " uptime";
$uptime = $self->sshcommand() . " " . $self->serverlogin() . " LANG=C uptime";
}
# Run uptime.
# As the command can take long to run if run remote