The best scripts ever (trick or treat)

Eric F Crist ecrist at secure-computing.net
Wed Nov 2 15:23:19 PST 2005


On Nov 2, 2005, at 3:09 PM, Gary Kline wrote:

> On Wed, Nov 02, 2005 at 10:47:43PM +0200, Giorgos Keramidas wrote:
>> On 2005-11-02 12:42, Gary Kline <kline at tao.thought.org> wrote:
>>> On Wed, Nov 02, 2005 at 10:14:40PM +0200, Giorgos Keramidas wrote:
>>>>>
>>>>> 	"CATEORY: foo
>>>>> 	"FUNCTION: it_does_this
>>>>> 	"OPTIONS: can_do_this_or_that"
>>>>>
>>>>> 	BEGINSCRIPT
>>>>> 	!#/bin/sh
>>>>> 	echo "hello world"
>>>>> 	ENDSCRIPT
>>>>
>>>> What happens when the script itself contains a line that starts
>>>> with one of the special "markup" lines?
>>>>
>>>
>>> 	AFAIK, the only markup lines this would use would be
>>> 	the <TAGS></TAGS>.  A sh script might use the ">" or "<"
>>> 	for redirection, but the conversion script would ignore
>>> 	everything between
>>>
>>> 	BEGINSCRIPT
>>> 	ENDSCRIPT
>>>
>>> 	which would make parsing straightforeward.
>>
>> Unless the shell script itself contains 'ENDSCRIPT' somewhere ;-)
>>
>> This is what I was referring to as "markup".
>
> 	Hmmm!   :-)
>
> 	Okay, then what about
> 	BEGIN_somelonghexstringthatis256byteslong
>
> 	and
>
> 	END_somelonghexstringthatis256byteslong

Dammit!! I was just writing a script that used that exact variable!

-----
Eric F Crist
Secure Computing Networks
http://www.secure-computing.net





More information about the freebsd-questions mailing list