03-31-2013
Also, exit(666) makes no sense. It only takes numbers 1-127.
9 More Discussions You Might Find Interesting
1. Solaris
I've got a c++ program that works fine on Linux, compiles on Solaris fine with g++, but will not write to a fstream correctly in a class object.
And I've run into numerous other bugs in the disk management.
Jon (4 Replies)
Discussion started by: Joncamp
4 Replies
2. Shell Programming and Scripting
I have a question about how to get the exit code of the first command when it appears in a pipe-lined command.
For example, I have the following script:
grep abc dddd | tee -a log
if ]
then
echo "ERROR!"
fi
In the above script, ] is supposed to test the exit code of "grep abc... (3 Replies)
Discussion started by: pankai
3 Replies
3. Shell Programming and Scripting
I have a file called "library" with the following content
libnxrdbmgr.a
libnxrdbmgr.so
libnxtk.a
libnxtk.so
libora0d_nsc_osi.so
I am trying to locate if these libraries are on my machine or not. find command runs for about few seconds and hangs after this.
Can someone please help me and... (3 Replies)
Discussion started by: knijjar
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I could not find the exactly same post here.. so I will explain what I did to get the last month using date command.
I used
date +%Y-%m -d "-1 months"
to get the last month. However, the returned value of above command on 2009/10/31 was 2009 10 and not 2009 09.. and the... (9 Replies)
Discussion started by: tigersk
9 Replies
5. UNIX for Advanced & Expert Users
Hi,
I am running the following command, and it tries to delete some dn from ldap, however, it takes lot of time before it finally request LDAP server to delete it.
I am trying to find why it is taking lot of time. Could you anyone help me in this regard. I have copies the pstack output, and... (3 Replies)
Discussion started by: john_prince
3 Replies
6. UNIX for Dummies Questions & Answers
Hi there can anyone help me
here is my code
echo "Type in a positive number"
read X
I=2
while
do
if
then
echo "It is not prime"
break
else
if
then
echo "It is prime"
break
else
I=$(( $I + 1))
fi
fi (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies
7. Solaris
Hi,
I have Solaris-10 OS on T5220. Both local disks were mirrored under SVM. Somehow when one disk gone bad (c0t1d0), other disk (c0t0d0) also got lot of bad block. We have readable data only on c0t0d0, but as soon as server comes after, it hangs when I run few commands because of read errors,... (1 Reply)
Discussion started by: solaris_1977
1 Replies
8. UNIX for Beginners Questions & Answers
I am trying to compile the datastage jobs using the Execute Command stage in datastage 11 or any Routines if possible. My datastage is on Unix machine.
So, How can I Compile a datastage job in UNIX from command line or any Routines.
Please help me in doing so.
Thank you. (1 Reply)
Discussion started by: elena jessi
1 Replies
9. Shell Programming and Scripting
Hello guys,
I have an issue when trying to do an egrep -v on a file, let me show you.
I want to filter the last column as to where it filters out the columns with asterisks and zeros ( * and 0 ) it is working properly up to a certain point where I have a value of '10000' which is also getting... (3 Replies)
Discussion started by: evergreen
3 Replies
LEARN ABOUT DEBIAN
xml::quote
Quote(3pm) User Contributed Perl Documentation Quote(3pm)
NAME
XML::Quote - XML quote/dequote functions
SYNOPSIS
use strict;
use XML::Quote qw(:all);
my $str=q{666 > 444 & "apple" < 'earth'};
print xml_quote($str),"
";
# 666 > 444 & "apple" < 'earth'
my $str2=q{666 > 444 & "apple" < 'earth'};
print xml_dequote($str2),"
";
# 666 > 444 & "apple" < 'earth'
my $str3=q{666 > 444 & "apple" < 'earth'};
print xml_quote_min($str3),"
";
# 666 > 444 & "apple" < 'earth'
DESCRIPTION
This module provides functions to quote/dequote strings in "xml"-way.
All functions are written in XS and are very fast; they correctly process utf8, tied, overloaded variables and all the rest of perl
"magic".
FUNCTIONS
$quoted = xml_quote($str);
This function replaces all occurences of symbols '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively.
Returns quoted string or undef if $str is undef.
$dequoted = xml_dequote($str);
This function replaces all occurences of '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively. All
other entities (for example ) will not be touched.
Returns dequoted string or undef if $str is undef.
$quoted = xml_quote_min($str);
This function replaces all occurences of symbols '&', '"', '<' to '&', '"', '<' respectively. Symbols ''' and '>' are not
replaced.
Returns quoted string or undef if $str is undef.
EXPORT
xml_quote(), xml_dequote() are exported as default.
PERFORMANCE
You can use t/benchmark.pl to test the perfomance. Here is the result on my P4 box.
Benchmark: timing 1000000 iterations of perl quote, xs quote...
perl quote: 108 wallclock secs (88.08 usr + 0.01 sys = 88.09 CPU) @ 11351.64/s (n=1000000)
xs quote: 20 wallclock secs (16.78 usr + 0.00 sys = 16.78 CPU) @ 59591.20/s (n=1000000)
Benchmark: timing 1000000 iterations of perl dequote, xs dequote...
perl dequote: 106 wallclock secs (85.22 usr + 0.09 sys = 85.31 CPU) @ 11721.54/s (n=1000000)
xs dequote: 19 wallclock secs (15.92 usr + 0.02 sys = 15.94 CPU) @ 62743.13/s (n=1000000)
AUTHOR
Sergey Skvortsov <skv@protey.ru>
SEE ALSO
http://www.w3.org/TR/REC-xml <http://www.w3.org/TR/REC-xml>, perlre
COPYRIGHT
Copyright 2003 Sergey Skvortsov <skv@protey.ru>. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2008-06-26 Quote(3pm)