[Bro] Escape sequences in BRO (\n)

Иван Раткин adh.2234 at gmail.com
Fri Aug 4 07:04:07 PDT 2017


Yeah. The code:
local line = fmt("%s", "Hi \n all!");
print line;

will print the Hi \n all!
:(

2017-08-04 16:48 GMT+03:00 anthony kasza <anthony.kasza at gmail.com>:

> Have you tried using the fmt function in conjunction with the print
> function?
> https://www.bro.org/sphinx/scripts/base/bif/bro.bif.bro.html#id-fmt
>
> -AK
>
> On Aug 4, 2017 6:09 AM, "Иван Раткин" <adh.2234 at gmail.com> wrote:
>
>> Hi. I got a trouble with escape sequences in Bro.
>> When i write:
>> print "Next words must be in a new line \n New line"
>> or
>> print "\n"
>>
>> \n will decoded in x0a or \n, but not decoded as a new.
>>
>> So there is a question: how can i make a new line in strings? F.e. i read
>> several strings of data and need to from string like
>> "hi,
>> its a new line
>> and it is too!"
>>
>> but only thing i have is "hi,\nits a new line\nand it is too!"
>>
>>
>> Thanks for answer
>>
>> _______________________________________________
>> Bro mailing list
>> bro at bro-ids.org
>> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20170804/5565ccb9/attachment.html 


More information about the Bro mailing list