Sponsored Content
Top Forums UNIX for Dummies Questions & Answers "Help with bash script" - "License Server and Patch Updates" Post 302895594 by profileuser on Tuesday 1st of April 2014 12:14:41 PM
Old 04-01-2014
Thanks Npandith,

I'll try that now and get back to you.

---------- Post updated at 05:10 PM ---------- Previous update was at 05:00 PM ----------

Hi Npandith,

You did it,

The last syntax error given now is the 'then' on line 29', what does this mean ?


Code:
[root@xen01 ~]# ./postscript.sh
./postscript.sh: line 11: echoDownloading updates...: command not found
--2014-04-01 17:06:07--  ftp://192.168.10.5/FTP/xen62/*.xsupdate
           => `.listing'
Connecting to 192.168.10.5:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /FTP/xen62 ... done.
==> PASV ... done.    ==> LIST ... done.

    [ <=>                                                                                                                           ] 951         --.-K/s   in 0.005s

2014-04-01 17:06:08 (169 KB/s) - `.listing' saved [951]

Removed `.listing'.
--2014-04-01 17:06:08--  ftp://192.168.10.5/FTP/xen62/XS62E001.xsupdate
           => `XS62E001.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E001.xsupdate ... done.
Length: 6625641 (6.3M)

100%[==============================================================================================================================>] 6,625,641   --.-K/s   in 0.1s

2014-04-01 17:06:08 (58.0 MB/s) - `XS62E001.xsupdate' saved [6625641]

--2014-04-01 17:06:08--  ftp://192.168.10.5/FTP/xen62/XS62E002.xsupdate
           => `XS62E002.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E002.xsupdate ... done.
Length: 1743501 (1.7M)

100%[==============================================================================================================================>] 1,743,501   --.-K/s   in 0.08s

2014-04-01 17:06:08 (20.1 MB/s) - `XS62E002.xsupdate' saved [1743501]

--2014-04-01 17:06:08--  ftp://192.168.10.5/FTP/xen62/XS62E004.xsupdate
           => `XS62E004.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E004.xsupdate ... done.
Length: 35766769 (34M)

100%[==============================================================================================================================>] 35,766,769  58.8M/s   in 0.6s

2014-04-01 17:06:09 (58.8 MB/s) - `XS62E004.xsupdate' saved [35766769]

--2014-04-01 17:06:09--  ftp://192.168.10.5/FTP/xen62/XS62E005.xsupdate
           => `XS62E005.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E005.xsupdate ... done.
Length: 9315631 (8.9M)

100%[==============================================================================================================================>] 9,315,631   32.8M/s   in 0.3s

2014-04-01 17:06:09 (32.8 MB/s) - `XS62E005.xsupdate' saved [9315631]

--2014-04-01 17:06:09--  ftp://192.168.10.5/FTP/xen62/XS62E010.xsupdate
           => `XS62E010.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E010.xsupdate ... done.
Length: 252927 (247K)

100%[==============================================================================================================================>] 252,927     --.-K/s   in 0.003s

2014-04-01 17:06:09 (77.5 MB/s) - `XS62E010.xsupdate' saved [252927]

--2014-04-01 17:06:09--  ftp://192.168.10.5/FTP/xen62/XS62E011.xsupdate
           => `XS62E011.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E011.xsupdate ... done.
Length: 845698 (826K)

100%[==============================================================================================================================>] 845,698     --.-K/s   in 0.02s

2014-04-01 17:06:09 (48.0 MB/s) - `XS62E011.xsupdate' saved [845698]

--2014-04-01 17:06:09--  ftp://192.168.10.5/FTP/xen62/XS62E012.xsupdate
           => `XS62E012.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E012.xsupdate ... done.
Length: 35767767 (34M)

100%[==============================================================================================================================>] 35,767,767  48.6M/s   in 0.7s

2014-04-01 17:06:10 (48.6 MB/s) - `XS62E012.xsupdate' saved [35767767]

--2014-04-01 17:06:10--  ftp://192.168.10.5/FTP/xen62/XS62E014.xsupdate
           => `XS62E014.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62E014.xsupdate ... done.
Length: 1745433 (1.7M)

100%[==============================================================================================================================>] 1,745,433   --.-K/s   in 0.04s

2014-04-01 17:06:10 (43.6 MB/s) - `XS62E014.xsupdate' saved [1745433]

--2014-04-01 17:06:10--  ftp://192.168.10.5/FTP/xen62/XS62ESP1002.xsupdate
           => `XS62ESP1002.xsupdate'
==> CWD not required.
==> PASV ... done.    ==> RETR XS62ESP1002.xsupdate ... done.
Length: 1744985 (1.7M)

100%[==============================================================================================================================>] 1,744,985   --.-K/s   in 0.04s

2014-04-01 17:06:10 (40.4 MB/s) - `XS62ESP1002.xsupdate' saved [1744985]

./postscript.sh: line 29: syntax error near unexpected token `then'
./postscript.sh: line 29: `then'

---------- Post updated at 05:14 PM ---------- Previous update was at 05:10 PM ----------

So apparently, the script has downloaded the updates however it has not applied the patched yet.

seems a long way to go yet in trouble shooting this script in order to apply the patches to the server.

Please assist whereever you can
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Shell Programming and Scripting

Simplify Bash Script Using "sed" Or "awk"

Input file: 2 aux003.net3.com error12 6 awn0117.net1.com error13 84 aux008 error14 29 aux001.ha.ux.isd.com error12 209 aux002.vm.ux.isd.com error34 21 alx0027.vm.net2.com error12 227 dux001.net5.com error123 22 us008.dot.net2.com error121 13 us009.net2.com error129Expected Output: 2... (4 Replies)
Discussion started by: sQew
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

8. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy