03-21-2007
If you just want to display those files with zero size,
go for this...
awk '{if ($1>0) {print "no errors in "$2; }else{ print "Error in "$2;}} temp.log
Or if you can use the below approch to tackle this..
while read line
do
{
file=$(echo $line| cut -f2 -d" ")
size=$(echo $line| cut -f1 -d" ")
if [ "$file" = "190_GSTV_HUX_003QISCGSK026_error070321.log" -a $size -gt 0 ]
then
echo "$file and $size" #or do whatever you want to do with that..
fi
}
done <temp
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a logic like this
It initializes the flag variable as "T" at the beginning of the loop everytime
Inside each loop it checks for two conditions and updates the flag variable as "A" or "B"
In the end of the loop it checks for the value of the variable flag for "A" or "B" and execute... (4 Replies)
Discussion started by: codeman007
4 Replies
2. Shell Programming and Scripting
:)
Hi,
I want to script for this scenerio,
OSR Settings
Scenario : We are looking to find all the *.a files from the following locations in the filesystem of a server.
OSR Directories
/etc
/bin
/usr/bin
/usr/sbin
/var/adm
These *.a files should have the permissions on... (12 Replies)
Discussion started by: sakthilinux
12 Replies
3. Shell Programming and Scripting
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Discussion started by: Shri123
6 Replies
4. Shell Programming and Scripting
Hi all,
ssh uname@remote_server 'cat /tmp/remote_file_name > home_dir/a512386/new/local_file_name'
The above given command is working fine.
but if i try to move the file only if exists in the remote server i.e) giving the same within if condition it executes but the file is not stored in my... (1 Reply)
Discussion started by: Shri123
1 Replies
5. Shell Programming and Scripting
Hi,
I am in trouble. I can get inside my condition test inside a loop :
I am in ksh (solaris)
while read file
do
<commande to retrieve file> >> ${LOG_RETRIEVE_FILE.log}
msg_err=$(cat ${LOG_RETRIEVE_FILE.log} | grep "error retrieve")
if ; then
<sendmail>
exit 1
fi
done
I tried... (6 Replies)
Discussion started by: Aswex
6 Replies
6. Shell Programming and Scripting
Hi All,
I want to change the name as SEQ_13
ie., <Property Name="Name">SEQ_13</Property>
when the Stage Type is PxSequentialFile
ie., <Property Name="StageType">PxSequentialFile</Property> :wall:
Input.XML
<Main>
<Record Identifier="V0S13" Type="CustomStage" Readonly="0">... (3 Replies)
Discussion started by: kmsekhar
3 Replies
7. Shell Programming and Scripting
This is what I have so far
grep -lir "some text" *
I need to check all files on the system for this text, if the text is found I need to change the file permissions so only ROOT has read and write access.
How can this be done? (3 Replies)
Discussion started by: mapleleafs89
3 Replies
8. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
9. Shell Programming and Scripting
I want to check if the string has the substring in IF condition then process...
i tried below but not working
if ];
then
.............
field can be "reserved1" ....reservedn / fillspaces1 ... fillspacesn (4 Replies)
Discussion started by: greenworld123
4 Replies
10. Shell Programming and Scripting
Hi,
I need to perform the untar and rm operation if the file found is a .tar and does not have test.tar or hello.tar as the file names.
Below is the loop to check the same.
for tf in *.tar
do if ]
then found=1
... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT DEBIAN
doveadm-log
DOVEADM-LOG(1) Dovecot DOVEADM-LOG(1)
NAME
doveadm-log - Locate, test or reopen Dovecot's log files
SYNOPSIS
doveadm [-Dv] log errors
doveadm [-Dv] log find [directory]
doveadm [-Dv] log reopen
doveadm [-Dv] log test
DESCRIPTION
The doveadm log commands are used to locate and reopen the log files of dovecot(1). It's also possible to test the configured targets of
the *log_path settings.
OPTIONS
Global doveadm(1) options:
-D Enables verbosity and debug messages.
-v Enables verbosity, including progress counter.
COMMANDS
log errors
doveadm log errors
The log errors command is used to show the last - up to 1,000 - errors and warnings. If no output is generated, no errors have occurred
since the last start.
log find
doveadm log find [directory]
The log find command is used to show the location of the log files, to which dovecot(1) sends its log messages. If dovecot(1) logs its
messages through syslogd(8) and doveadm(1) could not find any log files, you can specify the directory where your syslogd writes its log
files.
log reopen
doveadm log reopen
This command causes doveadm to reopen all log files, configured in the log_path, info_log_path and debug_log_path settings. These settings
are configured in /etc/dovecot/conf.d/10-logging.conf.
This is for example useful after manually rotating the log files.
log test
doveadm log test
This command causes doveadm to write the message "This is Dovecot's priority log (timestamp)" to the configured log files. The used prior-
ities are: debug, info, warning, error and fatal.
EXAMPLE
This example shows how to locate the log files used by dovecot(1).
doveadm log find
Looking for log files from /var/log
Debug: /var/log/dovecot.debug
Info: /var/log/mail.log
Warning: /var/log/mail.log
Error: /var/log/mail.log
Fatal: /var/log/mail.log
REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail-
able at: http://dovecot.org/bugreport.html
SEE ALSO
doveadm(1)
Dovecot v2.1 2012-02-22 DOVEADM-LOG(1)