"Help with bash script" - "License Server and Patch Updates"
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.
Currently getting No file or directory exist: please see the main script below:
The servers need to contact a license server over the network, after that, they need to pick up their updates (patches) and install accordingly, however I need to customize the script to our own environment. Thanks in advance
Last edited by Corona688; 03-28-2014 at 02:32 PM..
Reason: Code tags for code, please.
Please use the code tags and for even more readability, please intend some certain code blocks (for which the use of code tag was its purpose!).
The file is 'saved' properly anyway, all you need to do is to give it execute permission.
Of course, if its path is neither: [/usr]/bin or $HOME/bin, then you need to provide the full path to the file to execute it.
I have chmod 755 the .sh from the command to give it full access permision. That worked and I was able to run the script as well and got an error exact error will be posted soon..
Could you please advise/help where to customize the script e.g
#HOSTNAME=$(hostname)echo $HOSTNAME
Do I put my server name after $xxxxx and is there supposed to be space before echo ?
Are ashes # comment or part of the execution script ?
#xe host-apply-edition edition=platinum host-uuid=$HOSTUUID license-server-#address=192.168.10.34 license-server-port=2700
other than ip address I inserted, i'm curious about the look of license-server-#address=
shouldn't #address=192.168.10.34 etc start on a new line and the # taken off (uncomment if that's what it means) ?
Please use the code tags and for even more readability, please intend some certain code blocks (for which the use of code tag was its purpose!).........
You want us to help you, please do so much effort so we can read your problem with ease...
I'm not sure exactly what you meant, however the question marks ? means that I'm trying to understand how to interprete a script.
The exact error message is now given below:
I have saved the file vim3.sh with Notepad ++ and selecting unix/sh
---------- Post updated at 02:41 PM ---------- Previous update was at 02:35 PM ----------
I tried to run cat to the .sh script to see if it gives any hidden added characters to the script but none so far: please see below.
Type "xsconsole" for access to the management console.
Last edited by Corona688; 03-28-2014 at 02:33 PM..
Reason: Code tags for code, please.
Well! its always better to write scripts on a unix server itself rather than writing it on notepad or on windows as it may generate Control-M characters(^M) as you have received now. Please run this below command and then rerun the script. Let us know the results. Thanks!
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)
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)
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)
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)
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)
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)