Sponsored Content
Top Forums UNIX for Beginners Questions & Answers UNIX Log File Content - Duplication Issue Post 303041161 by vbe on Friday 15th of November 2019 05:35:30 PM
Old 11-15-2019
Closing thread as this looks like homework, but mostly because once again you posted twice knowing its against our rules and for that reason you will receive yet again a infraction...
Please continue here:
Print Error in Console and both Error & Output in Log file - UNIX
This User Gave Thanks to vbe For This Post:
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

File Duplication

hi all how to find the file duplication in a windows 2000 server as usual replies are sincerely appreciated. thanks raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies

2. Shell Programming and Scripting

File Duplication Script?

I have a file, let's say 1.jpg, and I have a text file that contains a list of filenames I would like to duplicate 1.jpg as (i.e., 2.jpg, 3.jpg, 4.jpg, etc.). The filenames that I want to create are all on separate lines, one per line. I'm sure there's a simple solution, but I'm not claiming to... (7 Replies)
Discussion started by: futurestar
7 Replies

3. UNIX for Advanced & Expert Users

File Descriptor redirection and duplication

i have many questions concerning the FD. it was stated that "to redirect Error to output std, you have to write the following code" # ls -alt FileNotThere File > logfile 2>&1 # cat logfile ls: cannot access FileNotThere: No such file or directory -rw-r--r-- 1 root root 0 2010-02-26... (9 Replies)
Discussion started by: ahmad.zuhd
9 Replies

4. UNIX for Dummies Questions & Answers

Display the content of the unix file

cat is the normal unix command to display the content of a file. Is there any program to display the content of the file. If there is, then can you send me the code. (5 Replies)
Discussion started by: vedanjalig
5 Replies

5. Shell Programming and Scripting

How to copy mail content in a file in Unix

Hi Guys I want to write a script which search mail with subject line and after that I want the mail content in a file please help guys. Thanks Atul Singh (3 Replies)
Discussion started by: atul9806
3 Replies

6. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

7. Shell Programming and Scripting

Need help to pick the content from Log file

Hi All, Below is my requirement. I need to pick the certain content from log file and display. for example log file consist of following information project1 project2 project3 filename1, size1, ower1, datecreated filename2, size2, ower2, datecreated filename3, size3, ower3,... (6 Replies)
Discussion started by: bbc17484
6 Replies

8. Shell Programming and Scripting

Create archive and nil the content of log file using script

Plese help I need a urgent requirement. Ex: test.log requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb and then in the archive folder log files are name to test.tar test1.tar test2.tar EX: /home/abc/ test.log ... (1 Reply)
Discussion started by: johney1981
1 Replies

9. Shell Programming and Scripting

How to Modify a file content in UNIX and sort for only required fields ?

I have the below contents in a file after making the below curl call curl ... | grep -E "state|Rno" | paste -sd',\n' | grep "Disconnected" > test "state" : "Disconnected",, "Rno" : "5554f1d2" "state" : "Disconnected",, "Rno" : "10587563" "state" : "Disconnected",, "Rno" :... (2 Replies)
Discussion started by: Vaibhav H
2 Replies

10. Shell Programming and Scripting

Check specific content from log file

Hi all, i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script: #!/bin/bash logfile=/opt/jboss-eap-6.3/standalone/log/server.log tail -fn0 $logfile | \... (7 Replies)
Discussion started by: nms
7 Replies
Net::Daemon::Log(3)					User Contributed Perl Documentation				       Net::Daemon::Log(3)

NAME
Net::Daemon::Log - Utility functions for logging SYNOPSIS
# Choose logging method: syslog or Win32::EventLog $self->{'facility'} = 'mail'; # Default: Daemon $self->{'logfile'} = undef; # Default # Choose logging method: stderr $self->{'logfile'} = 1; # Choose logging method: IO handle my $file = IO::File->new("my.log", "a"); $self->{'logfile'} = $file; # Debugging messages (equivalent): $self->Log('debug', "This is a debugging message"); $self->Debug("This is a debugging message"); # Error messages (equivalent): $self->Log('err', "This is an error message"); $self->Error("This is an error message"); # Fatal error messages (implies 'die') $self->Fatal("This is a fatal error message"); WARNING
THIS IS ALPHA SOFTWARE. It is *only* 'Alpha' because the interface (API) is not finalised. The Alpha status does not reflect code quality or stability. DESCRIPTION
Net::Daemon::Log is a utility class for portable logging messages. By default it uses syslog (Unix) or Win32::EventLog (Windows), but logging messages can also be redirected to stderr or a log file. Generic Logging $self->Log($level, $msg, @args); This is the generic interface. The logging level is in syslog style, thus one of the words 'debug', 'info', 'notice', 'err' or 'crit'. You'll rarely need info and notice and I can hardly imagine a reason for crit (critical). In 95% of all cases debug and err will be sufficient. The logging string $msg is a format string similar to printf. Utility methods $self->Debug($msg, @args); $self->Error($msg, @args); $self->Fatal($msg, @args); These are replacements for logging with levels debug and err. The difference between the latter two is that Fatal includes throwing a Perl exception. Chossing a logging target By default logging will happen to syslog (Unix) or EventLog (Windows). However you may choose logging to stderr by setting $self->{'logfile'} = 1; This is required if neither of syslog and EventLog is available. An alternative option is setting $self->{'logfile'} = $handle; where $handle is any object supporting a print method, for example an IO::Handle object. Usually the logging target is choosen as soon as you call $self->Log() the first time. However, you may force choosing the target by doing a $self->OpenLog(); before calling Log the first time. MULTITHREADING
The Multithreading capabitities of this class are depending heavily on the underlying classes Sys::Syslog, Win32::EventLog or IO::Handle. If they are thread safe, you can well assume that this package is too. (The exception being that you should better call $self->OpenLog() before threading.) AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Phone: +49 7123 14887 Email: joe@ispsoft.de All rights reserved. You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::Daemon(3), Sys::Syslog(3), Win32::EventLog(3), IO::Handle(3) perl v5.16.3 2011-03-01 Net::Daemon::Log(3)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy