Changeset 30531
- Timestamp:
- 2016-05-12T17:42:40+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/servercontrol.pm
r30530 r30531 133 133 } 134 134 else { 135 # ampersands need to be escaped with single quotes 135 # ampersands need to be escaped 136 # - with single quotes around it for linux for the cmd to run in bash subshell 137 # - with a ^ before it on windows for the cmd to run in a DOS prompt subshell 138 # - or the entire wget command should be nested double quotes (single quotes don't work on windows) 136 139 my $wgetCommand = $command; 137 $wgetCommand =~ s@&@'&'@g;138 140 139 141 my $wget_file_path = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wget"); … … 145 147 # Searching for "perl backtick operator redirect stderr to stdout": 146 148 # http://www.perlmonks.org/?node=How%20can%20I%20capture%20STDERR%20from%20an%20external%20command%3F 147 $wgetCommand = "\"$wget_file_path\" --output-document=- -T 5 -t 1 $library_url$wgetCommand2>&1";148 #$wgetCommand = "\"$wget_file_path\" --spider -T 5 -t 1 $library_url$wgetCommand2>&1"; # won't save page149 $wgetCommand = "\"$wget_file_path\" --output-document=- -T 5 -t 1 \"$library_url$wgetCommand\" 2>&1"; 150 #$wgetCommand = "\"$wget_file_path\" --spider -T 5 -t 1 \"$library_url$wgetCommand\" 2>&1"; # won't save page 149 151 my $response_content = `$wgetCommand`; 150 152 my $response_code = undef;
Note:
See TracChangeset
for help on using the changeset viewer.