Refine your search:

In my log file there at the end of a file there is substitution character x1A, here is the file with that character. I've tried following:

props.conf
SEDCMD-stripsub = s/\\x1A//g
SEDCMD-stripnull = s/\\x00//g

For null characters x00 it works perfectly fine, but not the substitution character. Any suggestions how to get rid of it?

asked 25 Oct '11, 08:56

giovere's gravatar image

giovere
55126
accept rate: 100%

I'm confused - just to clarify, does the second SEDCMD (stripnull) work but the first one doesn't?

(25 Oct '11, 10:01) Ayn

One Answer:

You shouldn't be escaping the \. If you want to remove a character with hex code x1a, you should use s/\x1a//g. When you see \x1A in the actual raw event, that's simply because Splunk substituted the non-printable character with a printable character sequence. I have no idea why the second one worked, unless your raw data contains the printable string rather than the null character itself.

link

answered 25 Oct '11, 10:56

gkanapathy's gravatar image

gkanapathy ♦
32.4k4827
accept rate: 41%

Feel stupid :) thanks it works

(26 Oct '11, 03:16) giovere
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4

Asked: 25 Oct '11, 08:56

Seen: 523 times

Last updated: 26 Oct '11, 03:16

Copyright © 2005-2012 Splunk Inc. All rights reserved.