04-26-2010
Look at the man page for "script". It may be what you are looking for.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
as the title suggests, i need to print a user message to a log file and the screen using perl.
in unix i set up a function using 'tee' like so
function Display_Message
{
echo "$*" | tee -ai $LOGFILE
}
the following command then obviously displays to the screen and prints to a log... (6 Replies)
Discussion started by: mjays
6 Replies
2. Shell Programming and Scripting
I want to output screen messages to a logfile when executing an automated script. I have tried the script and command to do this but with no luck.
Thanks,
Nicole (5 Replies)
Discussion started by: nsutti
5 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have 2 files
file1
12312341231612634
34534368463786347
23472364287687263
23472357841007237
file2
12123561235176351*dhfsdhfh*2347623462*sdfjshehweu*123651235*sdgfsgfsy*23237346*
23472357841007237*defsjdf*12378234*hsdhfsdhgfsh*12837238947*dsjshgdfs*2348972348*... (1 Reply)
Discussion started by: unxusr123
1 Replies
4. UNIX Desktop Questions & Answers
I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting.
I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a... (4 Replies)
Discussion started by: tdelliott
4 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script.
I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file.
I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies
6. Shell Programming and Scripting
I am trying to get following result from the scipt I have. First time it generates the o/p in correct format. However if I run it again it appends to the existing file. I would like to see o/p on screen as well as save it in file. Everytime it should create new file.
## I/P file
0174
0175... (3 Replies)
Discussion started by: dynamax
3 Replies
7. Shell Programming and Scripting
HI ALl
I am creating a script where i can print ps output to find out most CPU utilised process.but in ps -ef we can get arg list only up to 80 character.
ps -ef | more
UID PID PPID C STIME TTY TIME CMD
root 0 0 0 Feb 20 ? 0:40 sched
root ... (3 Replies)
Discussion started by: devesh123
3 Replies
8. Shell Programming and Scripting
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
9. Programming
So I have ported a C++ program from windows to linux
and when I run it from terminal all is well. However
when executed from file manager there is no screen output.
The program runs and does what it should, just the problem
of not knowing if there are errors or if its even complete. Is there a... (12 Replies)
Discussion started by: pinbot
12 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am trying to out of shell script when i run it
like
sh /mypath/abc.sh
....a screen log should be generated whenever i input the values, when above the script prompt for values
Regards
Amarendra (3 Replies)
Discussion started by: amar1208
3 Replies
LEARN ABOUT SUSE
log::log4perl::appender::screen
Appender::Screen(3) User Contributed Perl Documentation Appender::Screen(3)
NAME
Log::Log4perl::Appender::Screen - Log to STDOUT/STDERR
SYNOPSIS
use Log::Log4perl::Appender::Screen;
my $app = Log::Log4perl::Appender::Screen->new(
stderr => 0,
utf8 => 1,
);
$file->log(message => "Log me
");
DESCRIPTION
This is a simple appender for writing to STDOUT or STDERR.
The constructor "new()" take an optional parameter "stderr", if set to a true value, the appender will log to STDERR. The default setting
for "stderr" is 1, so messages will be logged to STDERR by default.
If "stderr" is set to a false value, it will log to STDOUT (or, more accurately, whichever file handle is selected via "select()", STDOUT
by default).
Design and implementation of this module has been greatly inspired by Dave Rolsky's "Log::Dispatch" appender framework.
To enable printing wide utf8 characters, set the utf8 option to a true value:
my $app = Log::Log4perl::Appender::Screen->new(
stderr => 1,
utf8 => 1,
);
This will issue the necessary binmode command to the selected output channel (stderr/stdout).
COPYRIGHT AND LICENSE
Copyright 2002-2009 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2010-02-07 Appender::Screen(3)