anyone know how to edit the wget from mos

All posts relating to Oracle database administration.

Moderator: Tim...

anyone know how to edit the wget from mos

Postby kytemaniac » Fri Apr 26, 2013 1:59 pm

Hi,

here's the code,

Code: Select all
#!/bin/sh

#
# Generated 4/25/13 5:54 PM
# Start of user configurable variables
#
LANG=C
export LANG

# SSO username and password
SSO_USERNAME=ABC@GMAIL.COM
SSO_PASSWORD=



# Path to wget command
WGET=/usr/bin/wget

# Location of cookie file
COOKIE_FILE=/tmp/$$.cookies

# Log directory and file
LOGDIR=.
LOGFILE=$LOGDIR/wgetlog-`date +%m-%d-%y-%H:%M`.log

# Output directory and file
OUTPUT_DIR=.

.....

$WGET --user-agent="Mozilla/5.0" --secure-protocol=auto --post-data $AUTH_DATA --save-cookies=$COOKIE_FILE --keep-session-cookies $SSO_SERVER$SSO_AUTH_URL -O sso.out >> $LOGFILE 2>&1

rm -f sso.out

$WGET  --user-agent="Mozilla/5.0"  --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p10404530_112030_Linux-x86-64_1of7.zip?aru=14125322&patch_file=p10404530_112030_Linux-x86-64_1of7.zip" -O $OUTPUT_DIR/p10404530_112030_Linux-x86-64_1of7.zip   >> $LOGFILE 2>&1

$WGET  --user-agent="Mozilla/5.0"  --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p10404530_112030_Linux-x86-64_2of7.zip?aru=14125322&patch_file=p10404530_112030_Linux-x86-64_2of7.zip" -O $OUTPUT_DIR/p10404530_112030_Linux-x86-64_2of7.zip   >> $LOGFILE 2>&1

$WGET  --user-agent="Mozilla/5.0"  --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p10404530_112030_Linux-x86-64_3of7.zip?aru=14125322&patch_file=p10404530_112030_Linux-x86-64_3of7.zip" -O $OUTPUT_DIR/p10404530_112030_Linux-x86-64_3of7.zip   >> $LOGFILE 2>&1

$WGET  --user-agent="Mozilla/5.0"  --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p10404530_112030_Linux-x86-64_4of7.zip?aru=14125322&patch_file=p10404530_112030_Linux-x86-64_4of7.zip" -O $OUTPUT_DIR/p10404530_112030_Linux-x86-64_4of7.zip   >> $LOGFILE 2>&1

$WGET  --user-agent="Mozilla/5.0"  --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/p10404530_112030_Linux-x86-64_5of7.zip?aru=14125322&patch_file=p10404530_112030_Linux-x86-64_5of7.zip" -O $OUTPUT_DIR/p10404530_112030_Linux-x86-64_5of7.zip   >> $LOGFILE 2>&1


but i experience the following error:

Code: Select all
[oracle@localhost oracle_11.2.0.3]$ /media/104F-17FB/it_vendor/oracle/rdbms/oracle11g/linux_x86-64/oracle_11.2.0.3/wget.sh
/media/104F-17FB/it_vendor/oracle/rdbms/oracle11g/linux_x86-64/oracle_11.2.0.3/wget.sh: line 54: /media/104F-17FB/it_vendor/oracle/rdbms/oracle11g/linux_x86-64/oracle_11.2.0.3/wgetlog-04-26-13-21:47.log: Invalid argument
/media/104F-17FB/it_vendor/oracle/rdbms/oracle11g/linux_x86-64/oracle_11.2.0.3/wget.sh: line 68: /media/104F-17FB/it_vendor/oracle/rdbms/oracle11g/linux_x86-64/oracle_11.2.0.3/wgetlog-04-26-13-21:47.log: Invalid argument



when I man wget
Code: Select all
      -O file
       --output-document=file
           The documents will not be written to the appropriate files, but all will be concatenated together and written to file.  If - is used as
           file, documents will be printed to standard output, disabling link conversion.  (Use ./- to print to a file literally named -.)

           Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell redirection:
           wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and all downloaded
           content will be written there.

           For this reason, -N (for timestamp-checking) is not supported in combination with -O: since file is always newly created, it will always
           have a very new timestamp. A warning will be issued if this combination is used.

           Similarly, using -r or -p with -O may not work as you expect: Wget won’t just download the first file to file and then download the rest to
           their normal names: all downloaded content will be placed in file. This was disabled in version 1.11, but has been reinstated (with a
           warning) in 1.11.2, as there are some cases where this behavior can actually have some use.

           Note that a combination with -k is only permitted when downloading a single document, as in that case it will just convert all relative
           URIs to external ones; -k makes no sense for multiple URIs when they’re all being downloaded to a single file.
:



I still could not figure out what's wrong and what need to be edited.

would appreciate if someone could tell me what to edit.

thanks a lot!
kytemaniac
Senior Member
 
Posts: 234
Joined: Tue May 19, 2009 12:59 am

Re: anyone know how to edit the wget from mos

Postby Tim... » Fri Apr 26, 2013 3:05 pm

Hi.

No idea. I suggest you raise an SR and ask them. :)

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17937
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 1 guest