05-21-2010
split stdout
Alister,
Is there a way to send stdout to the screen and to a log file?
thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
linux redhat 8.0
I am getting accustomed to using the -exec command to get around my databse.. and use it to edit and update files..! is this more apllicable than jumping from one directory to the other.. I have set up the databse so that the inode #'s are accessable and can get me from one... (0 Replies)
Discussion started by: moxxx68
0 Replies
2. Shell Programming and Scripting
hai
i want know the difference between two shell scripts those are
1)
a=2004
echo $a #output------2004
exec < inputfile
while read line
do
echo $a #output-------2004
a=2005
echo $line
echo $a ... (1 Reply)
Discussion started by: g_s_r_c
1 Replies
3. UNIX for Dummies Questions & Answers
I have a ksh script that contains the following:
find /dir1/dir2 -type f -name "FILE.*" -newer /dir1/dir2/afterme.txt -exec cp /dir1/dir2/dir3 {} \;
When I run it from the cli, it runs fine. When I run it from the ksh script I get
find: missing argument to `-exec'
I also tried -exec cp... (40 Replies)
Discussion started by: bbbngowc
40 Replies
4. Shell Programming and Scripting
can any one pls explain the meaning of
exec 1<&5 ?? its urgent (2 Replies)
Discussion started by: santosh1234
2 Replies
5. Shell Programming and Scripting
All,
I am using below shell script to output the content to outputfile.txt. What I am looking for is in addition to outputfile.txt, I want the output to be on standard output too.
exec > outputfile.txt
echo "Starting "
echo "ending" (5 Replies)
Discussion started by: basic_shell
5 Replies
6. UNIX for Dummies Questions & Answers
Hi can some one explain the following command , It would really help if some can really elloborate on what is happening out here
export PATH | exec /bin/sh ./auto_approve :q
P.S: This is the first time i am using exec ,so an elloboration what does it do and what is the use of the :q will be... (1 Reply)
Discussion started by: Sri3001
1 Replies
7. Shell Programming and Scripting
Hi,
I have the following lines in a script :
.
.
exec < some_file
.
.
.
I have very little idea about exec command. I would like to know what this does and what will happen if the file some_file does not exist. Specifically, I would like to know whether the lines following this... (5 Replies)
Discussion started by: elixir_sinari
5 Replies
8. Shell Programming and Scripting
I have the following bash script lines in a file named test.sh.
#!/bin/bash
#
# Write Date to cron.log
#
echo "Begin SSI Load $(date +%d%b%y_%T)"
#
# Get the latest rates file for processing.
#
d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1)
filename=$d
export filename... (3 Replies)
Discussion started by: ginowms
3 Replies
9. Shell Programming and Scripting
Hi all,
Forgive me for asking for help with my first post, but I am struggling here. I've been asked to translate a bash script into a Windows script (probably batch or powershell, not sure yet), so the first step is obviously understand what the bash script is doing. But I have no experience in... (5 Replies)
Discussion started by: el_foz
5 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT SUSE
net::xmpp::debug
Net::XMPP::Debug(3) User Contributed Perl Documentation Net::XMPP::Debug(3)
NAME
Net::XMPP::Debug - XMPP Debug Module
SYNOPSIS
Net::XMPP::Debug is a module that provides a developer easy access
to logging debug information.
DESCRIPTION
Debug is a helper module for the Net::XMPP modules. It provides
the Net::XMPP modules with an object to control where, how, and
what is logged.
Basic Functions
$Debug = new Net::XMPP::Debug();
$Debug->Init(level=>2,
file=>"stdout",
header=>"MyScript");
$Debug->Log0("Connection established");
METHODS
Basic Functions
new(hash) - creates the Debug object. The hash argument is passed
to the Init function. See that function description
below for the valid settings.
Init(level=>integer, - initializes the debug object. The level
file=>string, determines the maximum level of debug
header=>string, messages to log:
setdefault=>0|1, 0 - Base level Output (default)
usedefault=>0|1, 1 - High level API calls
time=>0|1) 2 - Low level API calls
...
N - Whatever you want....
The file determines where the debug log
goes. You can either specify a path to
a file, or "stdout" (the default). "stdout"
tells Debug to send all of the debug info
sent to this object to go to stdout.
header is a string that will preappended
to the beginning of all log entries. This
makes it easier to see what generated the
log entry (default is "Debug").
setdefault saves the current filehandle
and makes it available for other Debug
objects to use. To use the default set
usedefault to 1. The time parameter
specifies whether or not to add a timestamp
to the beginning of each logged line.
LogN(array) - Logs the elements of the array at the corresponding
debug level N. If you pass in a reference to an
array or hash then they are printed in a readable
way. (ie... Log0, Log2, Log100, etc...)
EXAMPLE
$Debug = new Net::XMPP:Debug(level=>2,
header=>"Example");
$Debug->Log0("test");
$Debug->Log2("level 2 test");
$hash{a} = "atest";
$hash{b} = "btest";
$Debug->Log1("hashtest",\%hash);
You would get the following log:
Example: test
Example: level 2 test
Example: hashtest { a=>"atest" b=>"btest" }
If you had set the level to 1 instead of 2 you would get:
Example: test
Example: hashtest { a=>"atest" b=>"btest" }
AUTHOR
Ryan Eatmon
COPYRIGHT
This module is free software, you can redistribute it and/or modify it under the LGPL.
perl v5.12.1 2010-07-05 Net::XMPP::Debug(3)