I have a bunch of hosts which I need to run a common script. I need a sleep timee which will delay the execution based on the hostname. Usually the hostname of the servers are host01, host02 .. host16 with which I cam up with this -
The second line works perfectly if the hostname is as previously mentioned with names host01, host02 .. host16.
What if the hostname is simply a generic name without any numbers are the end, I thought of simply generating a number.
Problem is, when the script is executed, I get this error-message
I've even added "2> /dev/null" at the end of line 2 and it stlll generate the above errors. This only happens on hosts with hostnames *without* tail-numbers
I would use something like this to generate random numbers (not in relation to host names): https://www.unix.com/302688175-post6.html
Just leave the alphabetic characters out and adjust the bits in the head -c.
Hi
Can you help me get the script for below requirement.
when i run below script
./script QM hostname
script should be working in below
here inputs are QM and hostname
by taking inputs it should work like below
QM=$1
if QM name ends with 1 $4 should be 51431
ends with ... (4 Replies)
Hi All,
So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says:
It should say:
What gives? And how do... (4 Replies)
I would want to run a code for 1 min and if it doesnt succeed in 1 min..I would want to exit it..I am using the following code...But the script is not going into my code part.It is waiting for 60 secs and then getting killed.
The code which is in the while loop actually takes less than 60 secs...... (6 Replies)
This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way:
How many times have you used the... (5 Replies)
Hello,
I am new to Solaris.
I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)