Sponsored Content
Full Discussion: How to use for and if?
Top Forums Shell Programming and Scripting How to use for and if? Post 302998733 by Corona688 on Tuesday 6th of June 2017 02:33:29 PM
Old 06-06-2017
I can show you some of it:
Code:
while read chat # Read lines one by one
do
        call=$(grep -c incoming /home/$chat)
        if [ "$call" -gt 0 ]
       then
               echo "$call > 0"
       else
               echo "$call = 0"
       fi

done < /tmp/t123.txt

...but I have absolutely no idea what CHK is supposed to be doing. More information please?
 
NAGZILLAC(1)						      General Commands Manual						      NAGZILLAC(1)

NAME
nagzillac - jabber relay bot client SYNOPSIS
nagzillac type^JID^message DESCRIPTION
This manual page documents briefly the nagzillac command. nagzillac is the client for nagzilla that takes the data you hand it as argument and sends it over to the nagzilla daemon that will send the message along. OPTIONS
nagzillac only takes one options that consists of three arguments. They are seperated by the carret character(`^'), although the last argu- ment may contain carrets without any troubles. Here is an explenation of the different parts: type This is the type of the message. It can be either room (which will send the message to a jabber conference room) or chat (target should be a jabber ID). JID This is the target for the message. If you choose room type it has to be a conference room name or complete ID. A single room with- out any @ in it will get sent to the configured conference server. If you choose the chat type the JID has to be the jabber ID of the user to receive the message, either just the user part which will get added the jabber server as domain part, or a full jabber ID. message The final part is the message that will get sent. At the moment it will be put into the body as plain text. Please notice that you will have to quote or escape special characters in the message like white space. FILES
/etc/nagzillac/nagzillac.cfg The configuration file for the nagzilla client. Please see the comments in the file for informations on what to tweak. EXAMPLE
The following sends a chat message to the rhonda user on the default server: nagzillac "chat^rhonda^hi there" This will send a message to a conference room on a different server: nagzillac "room^monitor@jabber.doma.in^alert - do something" SEE ALSO
nagzillad(1). AUTHOR
nagzillac was written by Bill Mathews. This manual page was written by Gerfried Fuchs <rhonda@debian.at> for the Debian project (and may be used by others). 2009-06-03 NAGZILLAC(1)
All times are GMT -4. The time now is 09:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy