From: Don Armstrong Date: Fri, 8 Jul 2016 20:09:15 +0000 (-0700) Subject: only escape if the command contains a space X-Git-Url: https://git.donarmstrong.com/?p=uiuc_igb_scripts.git;a=commitdiff_plain;h=819b503b14406a8509f6ea12a425513b5916d9df only escape if the command contains a space --- diff --git a/dqsub b/dqsub index 3d6f6f7..1682d05 100755 --- a/dqsub +++ b/dqsub @@ -260,7 +260,7 @@ sub write_qsub_script { my ($opt,$arg,$array) = @_; my $script = "#!/bin/bash\n"; - my $command = join(' ',map {qq('$_')} @{$arg}); + my $command = join(' ',map {$_ =~ /\s/?qq('$_'):$_} @{$arg}); $script .= <