01-06-2011
Variables passed to expr (x or y) are not initialized.
You are assigning values to x or y in if/else block, so depending on conditions, x/y may not be initialized.
Pls make sure you initilize x and y out of if/else bolck.
Have a look at your earlier post:
https://www.unix.com/shell-programmin...t-working.html
Last edited by anurag.singh; 01-06-2011 at 10:12 AM..
This User Gave Thanks to anurag.singh For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi
can someone help me to write a script to monitor the growth of the directory running at 5 hours interval and then pipe it to a file :(?
i only know the manual command "du -sk"
and the worst i dun know anything about script. (3 Replies)
Discussion started by: legato
3 Replies
2. UNIX for Advanced & Expert Users
i have a unix batch written in c, dealing with really time-consuming
database operations
i want to write a ksh script to monitor its performance.
which items i should monitor?
do you have any suggestions?
1)cputime
2)swap area
3)pmem
4)
5)
what else? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
3. Shell Programming and Scripting
Hi Gurus,
Currently I am learning UNIX through online forums and unix blogs. I have the below requirement.
I need to write a script to monitor server processes. For example, there are 3 processes currently running on the server.(java, pmrepagent, pmserver). If any of the process goes down,... (2 Replies)
Discussion started by: svajhala
2 Replies
4. Shell Programming and Scripting
Can someone please explain to me how come snmpwalk doesn't always find a running process that's on a remote server?
I prefer to use snmp to monitor processes remotely because this doesn't require me to put a script on that remote box. but the problem is, there are times that my snmp command... (2 Replies)
Discussion started by: SkySmart
2 Replies
5. Red Hat
Hi,
I ned to monitor the memory for the red-hat machine,when its reaches a threshold value like 2GB then a mail should be sent as soon as it finds the the value is met
can you suggest me which is the best way to do this? (2 Replies)
Discussion started by: sriniv666
2 Replies
6. Solaris
can any one help me in this issue iscsiadm: ISCSI_AUTH_GET failed, errno: 5 Monitored File: /var/adm/messages (1 Reply)
Discussion started by: saripudi1985
1 Replies
7. UNIX for Advanced & Expert Users
Hi
I do a very simple monitoring of our OpenLDAP (runs in cronjob and generate alerts if unsuccessfull)
$ ldapsearch -h hostname.domain -D "cn=monitor_user,ou=People,dc=organisation" -w "password" -b "dc=organisation" -x "(&(cn=monitor_user)(ou=People))" dn | grep -v version
dn:... (4 Replies)
Discussion started by: slashdotweenie
4 Replies
8. Shell Programming and Scripting
I currently have a shellscript to check the size of a filesystem and email me if the size is over a certain percentage (80%). I have this script on crontab and executes the shell every 10 mins.
I have the above in place on 8 servers. It so happens that a file system on one of the servers is... (1 Reply)
Discussion started by: goddevil
1 Replies
9. Linux
Hello,
I setup a check_esx_host_vmfs plugin for monitoring datastore status on ESXi server. But on configuring this plugin, this is working fine but it displays "WARNING" status on UI of Nagios every time.
Currently my datastore size is 926.50 GB and right now free space available is 570.60 GB... (2 Replies)
Discussion started by: sunnysthakur
2 Replies
10. Web Development
Hello,
I have installed a WordPress theme on Cantos and brought up a website on AWS. I have added that website on Cloudflare. While I was working on webpage development, I noticed that sometimes website is unreachable. In 8 hours, I noticed it 2-3 times and after few seconds, it would come back... (1 Reply)
Discussion started by: solaris_1977
1 Replies
BF_TAR(1) BF_TAR(1)
NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout
SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory
DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see
EXAMPLES below).
OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log
files.
The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive
is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files.
EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble.
EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar
Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar.
o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz
Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz.
o bf_tar `pwd`/mydirectory > outfile.tar
Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path.
NOTES
This script is meant for use with Berkeley DB based bogofilter versions.
This script requires a SUSv2 compliant pax utility.
This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so
that /usr/xpg4/bin/sh can be used.
07/23/2007 BF_TAR(1)