in reply to How to convert a shell script to Perl?
I don't know why, but I thought I'd give it a try ;)
I'm not too well versed with shell scripting, but it appears as though this might be a start:
#!/usr/bin/perl use warnings; use strict; if ( ! $ARGV[0] ){ print "Usage: $0 patch_file\n"; exit; } my $patch = $ARGV[0]; my $url = "http://updates.oracle.com/Orion/Download/"; print "\nEnter metalink username: "; my $username = <STDIN>; print "\nEnter metalink password: "; my $password = <STDIN>; chomp( $username, $password ); my $fetch = "wget " . "--http-user=$username " . "--http-password=$password " . "--no-check-certificate " . "--output-document=$patch " . "$url"; `$fetch`;
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to convert a shell script to Perl?
by salva (Canon) on Jun 30, 2010 at 13:03 UTC | |
by stevieb (Canon) on Jun 30, 2010 at 13:36 UTC |