I apologize to everyone helping out here, I posted such a bad sample of what I'm actually doing. Anyway this one below is much closer to what I'm actually doing.
I've just found a way on how to deal with \n special character in HP-UX thus the above. Anyway, I replaced the delimiters with ":" because spaces inside the commands in quotes are problematic. When I try the code below in HP-UX:
I get the output below:
That's why I can't use awk to assign variables. The only way I've seen so far to solve this is to replace the spaces with another character, like a comma, then remove the comma with sed substitution when I assign the command on a variable. Too much of a hassle. If you have a way to simplify this, please let me know.
Thanks for the help so far.
Last edited by The Gamemaster; 05-14-2018 at 02:52 AM..
I want to go through the list of items and run it.
while running it, some of them will have either
>there is no response # and then end it... so that it can go to next item
OR
>there is response # but in order to break out of it, u need to do Control c.
How do you send control... (6 Replies)
I have the following statement in script:
find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do
...
done
When there are no files located by the find comand it returns:
"find: bad status-- /home/rnitcher/test/....." to the command line
How do I get control in... (3 Replies)
Hi,
I have taken a piece of code from a book, which is working as per the specification. The code....
for entry in *
do
if
then
echo $entry
fi
done
The sub-directories present in the current directory will be displayed while executing.
... (3 Replies)
I have an empty .gz file in archival directory. And I am redirecting to a dat file. My while loop is not getting ended. I need the solution.
cnt=0
while read line
do
cnt=`expr $cnt + 1`
echo "$ARCH_DIR/$line.gz" >> $DATA_DIR/$FILE_LIST_FILE_FEB
FILE_NAMES=${FILE_NAMES}"... (2 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hello,
I would like to control and check the right parameters
$1 must have 4 alphabetics digits among eora qora pora fora
$2 must have 2 numerics digits 00 to 11
$3 must have 2 numerics digits 00 to 59
$4 must have 10 characters alpha numerics as 2013-02-26
For example :
In case 5) if i... (1 Reply)
Hello,
I would like to control and check the right parameters
$1 must have 4 alphabetics digits among eora qora pora fora
$2 must have 2 numerics digits 00 to 11
$3 must have 2 numerics digits 00 to 59
$4 must have 10 characters alpha numerics as 2013-02-26
For example :
In case 5) if i... (15 Replies)
Hello All,
I have an awk script which parses my log file and prints number grepping from a specific line/pattern, now i have to come with a shell script to continue reading the log untill the job is completed, which i would know while reading session log untill process encounters a final... (1 Reply)
Discussion started by: Ariean
1 Replies
LEARN ABOUT DEBIAN
logfetch
LOGFETCH(1) General Commands Manual LOGFETCH(1)NAME
logfetch - Xymon client data collector
SYNOPSIS
logfetch CONFIGFILE STATUSFILE
DESCRIPTION
logfetch is part of the Xymon client. It is responsible for collecting data from logfiles, and other file-related data, which is then sent
to the Xymon server for analysis.
logfetch uses a configuration file, which is automatically retrieved from the Xymon server. There is no configuration done locally. The
configuration file is usually stored in the $BBHOME/tmp/logfetch.cfg file, but editing this file has no effect since it is re-written with
data from the Xymon server each time the client runs.
logfetch stores information about what parts of the monitored logfiles have been processed already in the $BBHOME/tmp/logfetch.status file.
This file is an internal file used by logfetch, and should not be edited. If deleted, it will be re-created automatically.
SECURITY
logfetch needs read access to the logfiles it should monitor. If you configure monitoring of files or directories through the "file:" and
"dir:" entries in client-local.cfg(5) then logfetch will require at least read-acces to the directory where the file is located. If you
request checksum calculation for a file, then it must be readable by the Xymon client user.
Do NOT install logfetch as suid-root. There is no way that logfetch can check whether the configuration file it uses has been tampered
with, so installing logfetch with suid-root privileges could allow an attacker to read any file on the system by using a hand-crafted con-
figuration file. In fact, logfetch will attempt to remove its own suid-root setup if it detects that it has been installed suid-root.
ENVIRONMENT VARIABLES
DU Command used to collect information about the size of directories. By default, this is the command du -k. If the local du-command
on the client does not recognize the "-k" option, you should set the DU environment variable in the $BBHOME/etc/hobbitclient.cfg
file to a command that does report directory sizes in kilobytes.
FILES
$BBHOME/tmp/logfetch.cfg
$BBHOME/tmp/logfetch.status
SEE ALSO xymon(7), hobbit-clients.cfg(5)Xymon Version 4.2.3: 4 Feb 2009 LOGFETCH(1)