Hi,
I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors.
It greps the logs for known errors which i have defined as variables.
The problem is the logs are huge, approx 30,000 before they rotate.
So I am forced to use grep instead... (3 Replies)
Hi,
I have a script which basically watches a log file for new lines using tail, then takes action based on what is logged. I wrote a script to do this for me and its working great, my only problem is that once per week, this log file is archived to another directory, and a new log is created.... (4 Replies)
I have three prodcution box
Prod1
Prod2
Prod3
I want to write a script which tail the log for each production box
and put it into some file which I have want to tail
For example
Prod1
-----
TIMER IXN=MEMPUT, USR=GGu1, elapsed = 0.176 seconds.
11:41:44 AUDIT MEMPUT: member... (4 Replies)
Hi guys...
What am I doing wrong?
#!/bin/sh
LINES=1
FILE=test.log
TAIL="/usr/bin/tail -n"
$TAIL -${LINES} ${FILE}
Error:
./tail.sh
usage: tail ]
tail ]
---------- Post updated at 08:41 AM ---------- Previous update was at 08:32 AM ----------
please ignore this... (3 Replies)
I have file that is being constantly written to
example: file.txt
ABC
EBC
ZZZ
ABC
I am trying to create a simple script that will tail this file and at the same time using tr to change B to F on lines containing 'B'.
I tried this and it doesn't seem to work.
#!/bin/bash
tail -f... (8 Replies)
Hello all,
I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done.
#!/bin/bash
askFile() {
echo -n "Enter file: "
read FILE
}
doTail() {
tail -F "${1}"
}
askFile
doTail... (4 Replies)
Hi everyone, I'm trying to write a script to format a file using unix2dos. I want to output all but the first 14 lines in a file. Then I want to pipe this to unix2dos to convert the output to a file that's easily readable on windows. Here's what I have:
export Lines=`wc -l < $1`
export... (11 Replies)
my unix machine is currently shared by many teams, because of that lots of processess are running and bad part is taht when I do psu ...i can see all tail processes as well , meaning ppl who have viewed files with tail and have forgotten to close it.
command prompt >> psu
tail -n 0 -f... (2 Replies)
I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250.
I would like to join all 250 of them together tail by tail as follows. For example
stat.1000
a b c
d e f
stat.1001
g h i
j k l
So that my output... (2 Replies)
Hi,
i have a script
tail -f logs| grep item
i need to end the script once it finds item in the logs folder, this happens on run time. (10 Replies)
Discussion started by: nikhil jain
10 Replies
LEARN ABOUT CENTOS
logsave
LOGSAVE(8) System Manager's Manual LOGSAVE(8)NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS -a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO fsck(8)E2fsprogs version 1.42.9 December 2013 LOGSAVE(8)