09-02-2009
Need help with script.
Hi:
I am using linux and trying to format logs. I have grepped for stuff like invalid users and /or error. However, the way the logs are formatted, sometimes the full error is not on the line, ie. it is on the next line. If I grep something, like:
cat /var/spool/mail/* |grep -i session |awk '{print $5}'
The information I want is in the log on the next line. Is there a way to get the following lines anyone can think of? Thanks so much for your help in advance.
Henry
5 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies
2. Shell Programming and Scripting
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies
3. UNIX for Dummies Questions & Answers
I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below.
#masterscript.sh
./callingscript.sh
echo $fileExist
#callingscript.sh
echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies
4. Shell Programming and Scripting
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies
5. Shell Programming and Scripting
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
MULOG(1) Museek Daemon Plus MULOG(1)
NAME
Mulog - Chat Logging Script for Museekd
DESCRIPTION
Mulog is command-line Python script that connects to museekd(1) and saves chat messages into log files. Under the Log Directory, it creates
room & private subdirectories and a syslog file. If it loses connection with museekd, it will automatically exit.
Setting the interface and password on the command-line is a security risk. Since interface and password settings are saved to the config
file when set, you should set them, exit mulog, and restart mulog without the options on the commandline..LP
Before running, you will need a working museekd(1) and need to know your museekd interface and interface password. Configure those with
musetup(1).
SYNOPSIS
mulog [-c <config-filename> ] [--config <config-filename>] [-i <host:port | /socket.path>] [--interface <host:port | /socket.path> [-p
<interface-password>] [--password <inteface-password>] [-l <directory>] [--log <directory>] [-v] [--version] [-h] [--help]
OPTIONS
Mulog accepts the following options:
-c <filename>, --config <filename>
Use a different config file.
-l <directory>, --log <directory>
Use a different chat log directory.
-i, --interface <host:port | /socket.path>
Choose a different interface (saved to config file)
-p, --password <interface-password>
Choose a different password (saved to config file)
-v, --version
Display Version and exit.
-h, --help
Display Help and exit.
EXAMPLE
To run this program the standard way type:
mulog
Alternativly you use a different config file with:
mulog --config mulog.config
To set the interface password:
mulog --password 1234567890
FILES
~/.museekd/mulog.config
The default location for the mulog config file.
~/.museekd/logs/
The default log directory.
~/.museekd/logs/syslog
The museekd error/connection log file.
~/.museekd/logs/room/
The directory where chat room logs are stored.
~/.museekd/logs/private/
The directory where private chat logs are stored.
AUTHORS
Hyriand <hyriand@thegraveyard.org>
daelstorm <daelstorm@gmail.com>
SEE ALSO
mucous(1) murmur(1) muscan(1) muscand(1)museekcontrol(1) museekd(1) musetup(1) musetup-gtk(1) museeq(1)
daelstorm Release 0.2.0 MULOG(1)