02-12-2015
Bingo!
Where's the "gold star" smiley when you need one?
----
Regards,
Ian
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Okay - I've been searching near and far for the answer to this seemly simple question..... how do I find the X25 address for a server. Is there some sort of dump or ping or even a config which would tell me the address.
I can find nothing on the web and my colleagues can't help either. (1 Reply)
Discussion started by: peter.herlihy
1 Replies
2. UNIX for Advanced & Expert Users
Hi, there are some servers here at work which issue a Safeword challenge after I login. Can anyone tell me exactly how the challenge/response system works? In particular, how are the valid keys decided? (2 Replies)
Discussion started by: blowtorch
2 Replies
3. Shell Programming and Scripting
I have the following text
Microsoft iSCSI Initiator version 2.0 Build 3497
Targets List:
iqn.2001-05.com.equallogic:0-8a0906-daef43402-138000002a4477ba-grsrv12-extra
iqn.2001-05.com.equallogic:0-8a0906-986f43402-520000002b447951-exchange
... (9 Replies)
Discussion started by: netmedic
9 Replies
4. Shell Programming and Scripting
Hi all,
Thanks in advanced.
This question really bothered me much. What i want is to replace any times of repeated 'TB' to 'T', below is example.
It can be fullfil by AWK and perl, but my desire is using SED to realize it.
So here means we treat TB as a whole part, which means 's/TB*/T/'... (4 Replies)
Discussion started by: summer_cherry
4 Replies
5. Shell Programming and Scripting
I have a web xml file that looks like this:
<allinfo>
<info>
<a>Name1<\a>
<b>address1<\b>
<c>phone1<c>
<\info>
<info>
<a>Name2<\a>
<b>address2<\b>
<c>phone2<c>
<\info>
<\allinfo>
I want to use sed to... (2 Replies)
Discussion started by: katrvu
2 Replies
6. Shell Programming and Scripting
Here's a regex substitution operation that has stumped me with sed:
How do you convert lines like this:
first.key ?{x.y.z}
second.key ?{xa.ys.zz.s}
third.key ?{xa.k}
to:
first.key ?{x_y_z}
second.key ?{xa_ys_zz_s}
third.key ?{xa_k}
So i'm basically converting all the... (11 Replies)
Discussion started by: neked
11 Replies
7. Shell Programming and Scripting
Hi everybody, I'm new to these forums and this is my first post. A couple days ago I was trying to find a simple script that would return an individual's local weather conditions using I.P. based geolocation. After many failed search attempts, I began my quest to create this for myself. I have to... (0 Replies)
Discussion started by: o0110o
0 Replies
8. Shell Programming and Scripting
Ok then i Have a challenge for you :
Give me PS1 so that it always display the least 2 levels of directory
(except if i am above of course)
I want it this way :
so if i go to
/
/home/
/home/user
/home/user/whatever
/home/user/whatever1/whatever2
my PS1 should respectively... (12 Replies)
Discussion started by: ctsgnb
12 Replies
9. AIX
Running a Power 5 Blade on AIX, with remote connectivity issues via putty.
AIX V 6.1.00-02
openssh V5.2.0.5300
openssl V0.9.8.1103
Intermittent remote connections. Seems to connect every other time I try via my putty client.
Using hosts.allow and hosts.deny to filter IP Addrss... (2 Replies)
Discussion started by: FrankM
2 Replies
10. UNIX for Dummies Questions & Answers
I've been given a directory full of subdirectories full of logfiles of the same name:
/logfiles/day1/file1/blockednodes.csv
day1-14
file1-48
The above is the actual directory structure for 14 days worth of a logfile that is generated every 30 minutes. It's been done this way to preserve the... (15 Replies)
Discussion started by: Cludgie
15 Replies
LEARN ABOUT PHP
bbcode_set_arg_parser
BBCODE_SET_ARG_PARSER(3) 1 BBCODE_SET_ARG_PARSER(3)
bbcode_set_arg_parser - Attach another parser in order to use another rule set for argument parsing
SYNOPSIS
bool bbcode_set_arg_parser (resource $bbcode_container, resource $bbcode_arg_parser)
DESCRIPTION
Attaches another parser to the bbcode_container. This parser is used only when arguments must be parsed. If this function is not used, the
default argument parser is the parser itself.
PARAMETERS
o $bbcode_container
- BBCode_Container resource, returned by bbcode_create(3).
o $bbcode_arg_parser
- BBCode_Container resource, returned by bbcode_create(3). It will be used only for parsed arguments
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
bbcode_set_arg_parser(3) usage example
<?php
/*
* Generating bbcode ruleset for main parser
*/
$arrayBBCode=array(
'quote'=> array('type'=>BBCODE_TYPE_ARG,
'open_tag'=>'<quote><h4>Source: {PARAM}</h4>',
'close_tag'=>'</quote>',
'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY|BBCODE_FLAGS_ARG_PARSING),
'b'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<b>', 'close_tag'=>'</b>',
'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY),
'u'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<u>', 'close_tag'=>'</u>',
'flags'=>BBCODE_FLAGS_SMILEYS_OFF | BBCODE_FLAGS_REMOVE_IF_EMPTY | BBCODE_FLAGS_SMILEYS_OFF),
'i'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<i>', 'close_tag'=>'</i>',
'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY),
);
/*
* Generating bbcode ruleset for argument parser
*/
$arrayBBCode_arg=array(
'b'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<b class="sub">', 'close_tag'=>'</b>',
'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY),
'u'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<u>', 'close_tag'=>'</u>',
'flags'=>BBCODE_FLAGS_SMILEYS_OFF | BBCODE_FLAGS_REMOVE_IF_EMPTY | BBCODE_FLAGS_SMILEYS_OFF),
'i'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<i>', 'close_tag'=>'</i>',
'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY),
);
/*
* Text we are going to parse
*/
$text=<<<EOF
[quote="[b]Test[/b]"]
Foo :)
[/quote]
[b]Bar example :)[/b] :)
EOF;
/*
* Init the two parsers
*/
$BBHandler=bbcode_create($arrayBBCode);
$BBArgHandler=bbcode_create($arrayBBCode_arg);
/*
* Setting Flags on the parsers
*/
bbcode_set_flags($BBHandler,
BBCODE_CORRECT_REOPEN_TAGS|BBCODE_DEFAULT_SMILEYS_ON|BBCODE_ARG_DOUBLE_QUOTE|
BBCODE_ARG_SINGLE_QUOTE|BBCODE_ARG_HTML_QUOTE,BBCODE_SET_FLAGS_SET);
bbcode_set_flags($BBArgHandler,
BBCODE_CORRECT_REOPEN_TAGS|BBCODE_DEFAULT_SMILEYS_ON|BBCODE_ARG_DOUBLE_QUOTE|
BBCODE_ARG_SINGLE_QUOTE|BBCODE_ARG_HTML_QUOTE,BBCODE_SET_FLAGS_SET);
/*
* Setting $BBArgHandler as the BBHandler argument parser
*/
bbcode_set_arg_parser($BBHandler,$BBArgHandler);
/*
* Adding Smileys handling rules to Main parser
*/
bbcode_add_smiley($BBHandler, ":)", "<img src="smiley.gif" alt=":)" />");
/*
* Use the main parser to parse text
*/
echo bbcode_parse($BBHandler,$text);
?>
The above example will output:
<quote><h4>Source: <b class="sub">Test</b></h4>
Foo <img src="smiley.gif" alt=":)" />
</quote>
<b>Bar example :)</b> <img src="smiley.gif" alt=":)" />
PHP Documentation Group BBCODE_SET_ARG_PARSER(3)