01-15-2009
Yup it worked but could you please expalin how.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Maybe it's an stupid question but remeber... I'm Junior..
I use command line to run programs, and some of them gives a lot of information when, for example, you open a window or other actions. That's really bad because my terminal gets full of unwanted messages, so I use "bin file & >/dev/null"... (1 Reply)
Discussion started by: piltrafa
1 Replies
2. Shell Programming and Scripting
Working in a bash environment, in the following example, how do I direct the error message that putting in an invalid flag (-j for example) would normally produce to dev/null?
while getopts "abcd" opt
do
case "$opt" in
i) a etc ;;
r) b etc ;;
f) c etc ;;
v) d... (7 Replies)
Discussion started by: Sniper Pixie
7 Replies
3. UNIX for Dummies Questions & Answers
Is it possible to redirect errors at the command line when you run the script such as bash scriptname & 2>/dev/null? (1 Reply)
Discussion started by: knc9233
1 Replies
4. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
5. Shell Programming and Scripting
Hi expert,
May I know what is the difference between below cron tab entry ?
0,12 * * * * /abc/myscript.sh > /dev/null 2>&1
0,12 * * * * /abc/myscript.sh (7 Replies)
Discussion started by: olaris
7 Replies
6. UNIX for Dummies Questions & Answers
How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&"
echo "hello" > /dev/null 2>&1
echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies
7. Shell Programming and Scripting
I apologize if this question has been answered else where or is too elementary.
I ran across a KSH script (long unimportant story) that does this:
if ; then
CAS_SRC_LOG="/var/log/cas_src.log 2>&1"
else
CAS_SRC_LOG="/dev/null 2>&1"
fithen does this:
/usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies
8. Shell Programming and Scripting
I'm using an text-to-speech synthesis in a script, and I need to redirect it's output to /dev/null
how can I do that ? And how to redirect the stream to his normal output then (sound card ) ?
thankx (2 Replies)
Discussion started by: firelink
2 Replies
9. Shell Programming and Scripting
Hello All and a Happy New year to yous guys.
I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work.
bash-3.00$ ls -l C* | wc -l 2>/dev/null
ls:... (2 Replies)
Discussion started by: bbbngowc
2 Replies
10. UNIX for Dummies Questions & Answers
Hello.
When I run a .ksh that contains the command below, and there is no file available in the source location the "FILE_NAME_*.CSV not found" error is still being displayed.
FILEN=$(ssh ${SOURCE_SERV} "cd ${SOURCE_LOCATION} ;ls ${FILES}") 2> /dev/null.
This is interfering with the rest... (4 Replies)
Discussion started by: jimbojames
4 Replies
LEARN ABOUT DEBIAN
rt::client::rest::searchresult
RT::Client::REST::SearchResult(3pm) User Contributed Perl Documentation RT::Client::REST::SearchResult(3pm)
NAME
RT::Client::REST::SearchResult -- Search results representation.
SYNOPSIS
my $iterator = $search->get_iterator;
my $count = $iterator->count;
while (defined(my $obj = &$iterator)) {
# do something with the $obj
}
DESCRIPTION
This class is a representation of a search result. This is the type of the object you get back when you call method "search()" on
RT::Client::REST::Object-derived objects. It makes it easy to iterate over results and find out just how many there are.
METHODS
count
Returns the number of search results. This number will always be the same unless you stick your fat dirty fingers into the object and
abuse it. This number is not affected by calls to "get_iterator()".
get_iterator
Returns a reference to a subroutine which is used to iterate over the results.
Evaluating it in scalar context, returns the next object or "undef" if all the results have already been iterated over. Note that for
each object to be instantiated with correct values, retrieve() method is called on the object before returning it to the caller.
Evaluating the subroutine reference in list context returns a list of all results fully instantiated. WARNING: this may be expensive,
as each object is issued retrieve() method. Subsequent calls to the iterator result in empty list.
You may safely mix calling the iterator in scalar and list context. For example:
$iterator = $search->get_iterator;
$first = &$iterator;
$second = &$iterator;
@the_rest = &$iterator;
You can get as many iterators as you want -- they will not step on each other's toes.
new You should not have to call it yourself, but just for the sake of completeness, here are the arguments:
my $search = RT::Client::REST::SearchResult->new(
ids => [1 .. 10],
object => sub { # Yup, that's a closure.
RT::Client::REST::Ticket->new(
id => shift,
rt => $rt,
);
},
);
SEE ALSO
RT::Client::REST::Object, RT::Client::REST.
AUTHOR
Dmitri Tikhonov <dtikhonov@yahoo.com>
perl v5.14.2 2011-12-27 RT::Client::REST::SearchResult(3pm)