function looks at every VG(volume group on servers having multiple) and if there are disks in missing state says OK.
Not quite: lsvg -o in AIX (i suppose this is AIX, yes?) gives a list of volume groups in varyon state, not "every volume group". If there is a volume group but you did a varyoffvg <vg> then it will not be included in this list, although it will be displayed in lsvg.
Also notice that in HACMP-clusters nowadays (HACMP 7.1.x and 7.2) VGs are in a "somewhat varyon" state on the passive node(s) if you get your disks from a SAN and the LUNs are in the "no_reserve" state. I am not sure if a lsvg -p would succeed on such a VG even though the disks are there.
Quote:
Originally Posted by kvosu
I would like the script to give single output of "OK:PASSED" instead of each time. how do i do it?
Wouldn't it make a lot of sense to include the name of the VG with problems if there is one? You also should not use "echo" in a ksh (you do use ksh, no?) but print, which is a shell-builtin. If you want to be 101% POSIX-compliant use neither but printf.
Anyway, consider this, change the error message to your liking and/or remove the -u2 if you want to redirect the error message to stdout instead of stderr:
Hello,
I need to create one very simple shell script that checks if the first character of the file ./pump.txt is 0 and in that case gives a message.
If the first character is instead 1, it does give a different message.
I have written:
irr= head -c 1 ./pump.txt
if ]; then
echo... (4 Replies)
Hello,
I am running openmediavault on my Raspberry and I would like to use it as a backup FTP server of snapshots taken from my IP cams.
So I get the network recorder to upload every 3 seconds a snapshot to the Raspberry. Everything works perfectly.
I would need now a simple script that... (5 Replies)
Hi ,
I am in need of simple shell script that has one input file containing some words
Input file 1 :
****ALEX***JOHN*******VIRGIL*****
CHRITINE*****FAISAL*****DON*****
****ALEX***JOHN*******VIRGIL*****
CHRITINE*****FAISAL*****DON*****
****ALEX***JOHN*******VIRGIL*****... (6 Replies)
Hello forum members,
I have to redirect a output of command into a text file inside a script file but iam getting an errors.so please see below script and suggest me for corrections.
#!/bin/ksh
read IP_ADD
echo nslookup $IP_ADD 2>&1| tee log1.txt
cat /amex/gcst/siva/Testr/log1.txt... (6 Replies)
Hello Friends,
I am writing a shell script which will grab a file if it exists and copies it to another folder and will append with current date. I have written but gives me error, plz help:
--------------------------------------------
#!/usr/bin/sh
source=/home/dev4rice/naveen/test1... (4 Replies)
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Hi all,
I am new to shell scripting.I have made a simple shell script which will give me number of records in a database table. The SQL statement is working fine and there are 11 rows in this table. But problem is that it is not printing this value and fucntion does not get called. Please see the... (5 Replies)
Hi,
I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram
I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
I M TRYING TO DO SUM THING I M A NEW LEARNER TO SHELL SCRIPT PLZZZ HELP ME FRIENDS
I M TRY TO DO SUM THING C IT AND HELP ME
First open a .ctl file
Copy the file into temp file
Add A EXTRA FIELD “ext_date” with keeping value “##**&&”
EG- EXT_DATE CONSTANT"******"
Each time... (2 Replies)
Hi,
I am new to unix as well as shell programming.
Any body can provide me a simple shell script which should copy/transfer/fetch a file(using FTP)from remote server to local system.and it should log the details when it was fetched.If there is any error,the error msg should log in log... (1 Reply)