02-15-2006
Thanks....it fixed the syntax error
Now I getting the following error
./disk_space_util.sh[23]: [/user21d: not found.
./disk_space_util.sh[23]: [/u003: not found.
./disk_space_util.sh[23]: [/u003: not found.
./disk_space_util.sh[23]: [/u003: not found.
./disk_space_util.sh[23]: [/u002: not found.
./disk_space_util.sh[23]: [/u002: not found.
=======================================
The code looks like this now
=========================
bdf | sed "s/%/ /g" | sed "/Filesystem/d" | sed "/cdrom/d" > $ORA_LOG/diskspace.tmp
cat $ORA_LOG/diskspace.tmp | while read LINE
do
SIZE=`echo $LINE | awk '{print $5}'`
MOUNT=`echo $LINE | awk '{print $6}'`
cat $ORA_LOG/diskspace0.tmp | while read LINE1
do
MOUNT1=`echo $LINE1 | awk '{print $1}'`
SIZE1=`echo $LINE1 | awk '{print $2}'`
if ["$MOUNT" -eq "$MOUNT1"]; then
if [ "$SIZE" -gt "$SIZE1" ]; then
SYSTEM=`echo $LINE | awk '{print $6}'`
echo "`hostname`:$SYSTEM is $SIZE% full" > $ORA_LOG/diskspace1.tmp
for dba in `cat $ORA_SCRIPT/DBA_EMAIL_LIST`
do
/usr/bin/mailx -s "Diskspace Above Threshold" $dba < $ORA_LOG/diskspace1.tmp
done
else
echo
fi
else
echo
fi
done
done
rm $ORA_LOG/diskspace.tmp
rm $ORA_LOG/diskspace1.tmp
===============================================
cat $ORA_LOG/diskspace0.tmp
/u001 80
/u002 80
/u003 80
===================================================
bdf | sed "s/%/ /g" | sed "/Filesystem/d" | sed "/cdrom/d"
/dev/vg00/lvol3 2097152 180528 1901664 9 /
/dev/vg00/lvol1 377776 82296 257696 24 /stand
/dev/vg00/lvol8 2621440 241376 2362280 9 /var
/dev/vg00/lvol9 2097152 690035 1319227 34 /var/adm/sw
/dev/vg00/lvol7 2621440 2105224 512936 80 /usr
/dev/vg05/sas8v2 524288 286107 223373 56 /usr/local/sas8v2
/dev/vg05/user21d 8388608 3172 8123400 0 /user21d
/dev/vg05/u003 31457280 29789928 1641360 95 /u003
/dev/vg05/u002 31457280 26119232 5254648 83 /u002
/dev/vg05/u001 20971520 14581072 6290736 70 /u001
/dev/vg00/lvol6 2097152 315104 1769088 15 /tmp
/dev/vg05/source 2097152 1614 1964574 0 /source
/dev/vg00/lvol5 3145728 1038848 2090480 33 /opt
/dev/vg00/lvol4 2097152 118032 1963680 6 /home
/dev/vg05/abinitio 108363776 25021208 82691768 23 /abinitio
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have been fighting with a syntax error for the last 2 days, still haven't got the solution. Could you please help me, your help will be greatly appreciated.
In my script I am getting a error in a for loop, its similar to the one as is below.
for v_id in v1 v2 v3 v4
do... (8 Replies)
Discussion started by: rajus19
8 Replies
2. Shell Programming and Scripting
I get this error when I try to run my script
(BTW, this is a simple script I am supposed to write for my class)
$ menuscript
menuscript: syntax error at line 89 : `"' unmatched
$
Here is the code (Any help is greatly appreciated)
(Line numbers included)
1 #!/bin/ksh
2 ... (2 Replies)
Discussion started by: KindHead
2 Replies
3. UNIX for Dummies Questions & Answers
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies
4. Shell Programming and Scripting
Hi
I not sure what is wrong with my script... when I try to run it I get the follow error: "remove: syntax error at line 77: `end of file' unexpected" Thanks in advance for any help.
ans=y
while
do
while :
do
echo "Please enter a name that you... (3 Replies)
Discussion started by: simpsonjr
3 Replies
5. Shell Programming and Scripting
Hey guys keep having problems with the below script syntax error near unpexpected token '0' exit 0 I have two directorys backups and Usr in the usr i have sub dir's wp,ss,pic which i would like to back up (copy those directorys to the backups directory) with user acknowledgement from command line.... (2 Replies)
Discussion started by: Spartukus
2 Replies
6. Shell Programming and Scripting
hello everyone
i am beginner on shell scripting .and i am working on my project work on ad hoc network
i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem "
syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies
7. Shell Programming and Scripting
Hi All,
I am new to Unix, I have written the following script in ksh and get a syntax error :wall:. I need some help to figure out the error and reason. The script below uses some variables from an environment file, also it executes a sql file. The sql file is correct and has no problems. I... (1 Reply)
Discussion started by: disshort23
1 Replies
8. UNIX for Dummies Questions & Answers
Hi guys i'd like to show you this code of my script, where i couldn't find this error
" #! /bin/bash
#copiabin.sh: copia todos los archivos ejecutables a bin
if
then
mkdir $HOME/bin
fi
# copia de archivos y contador N
N=0
for ARCH in *
do
if # Si el archivo es... (9 Replies)
Discussion started by: Newer
9 Replies
9. Shell Programming and Scripting
So, I'm writing my first shell script to try to speed up the process of creating lyric files for mocp and I don't know what the error is, but considering how short the code is, I'm betting it's something super-obvious.
line 7: syntax error near unexpected token `echo'
line 7: ` echo... (4 Replies)
Discussion started by: D351
4 Replies
10. UNIX for Beginners Questions & Answers
Evening All (or morning for some),
Could anyone have a look at the below and advise where i've going wrong with the syntax as i keep getting the below error while trying to run.
Any help would be really apprecaited.
./testout: line 13: syntax error near unexpected token `else'
... (4 Replies)
Discussion started by: mutley2202
4 Replies
LEARN ABOUT CENTOS
vgimportclone
VGIMPORTCLONE(8) System Manager's Manual VGIMPORTCLONE(8)
NAME
vgimportclone - import and rename duplicated volume group (e.g. a hardware snapshot)
SYNOPSIS
vgimportclone [-n|--basevgname VolumeGroupName] [-i|--import] PhysicalVolume [PhysicalVolume...]
DESCRIPTION
vgimportclone is used to import a duplicated VG (e.g. hardware snapshot). Duplicate VG(s) and PV(s) are not able to be used until they are
made to coexist with the origin VG(s) and PV(s). vgimportclone renames the VG associated with the specified PV(s) and changes the associ-
ated VG and PV UUIDs.
OPTIONS
See lvm(8) for common options.
-n, --basevgname VolumeGroupName
By default the snapshot VG will be renamed to the original name plus a numeric suffix to avoid duplicate naming (e.g. 'test_vg'
would be renamed to 'test_vg1'). This option will override the base VG name that is used for all VG renames. If a VG already
exists with the specified name a numeric suffix will be added (like the previous example) to make it unique.
-i, --import
Import exported Volume Groups. Otherwise VGs that have been exported will not be changed (nor will their associated PVs).
ENVIRONMENT VARIABLES
LVM_BINARY
The LVM2 binary to use. Defaults to "lvm".
Examples
The origin VG "vg00" has origin PVs "/dev/sda" and "/dev/sdb" and the respective snapshot PVs are "/dev/sdc" and "/dev/sdd". To rename the
VG associated with "/dev/sdc" and "/dev/sdd" from "vg00" to "vg00_snap" (and to change associated VG and PV UUIDs) do:
vgimportclone --basevgname vg00_snap /dev/sdc /dev/sdd
SEE ALSO
lvm(8), vgrename(8)
Red Hat, Inc. LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) VGIMPORTCLONE(8)