Refine your search:

3
1

We're building an app which is intended to be deployed onto Windows, Unix, and Mac versions of Splunk. In our app's config files, which OS's line ending format should we use? The question covers a few angles:

  • will any line-ending format cause trouble for Splunk itself? (Assuming no, but want to make sure)
  • if Splunk installs the app, is the installer smart enough to convert the line endings of config files being installed?
  • if we have to pick one line ending, and users manually untar and install the files, which line ending is least annoying to the default text editors used on other OS's with different line endings?

asked 18 Aug '10, 03:57

Justin%20Grant's gravatar image

Justin Grant
1.4k4533
accept rate: 44%

edited 18 Aug '10, 13:39

Lowell's gravatar image

Lowell ♦
9.1k623


One Answer:
  • No, either Windows style (CR-LF) or Unix (LF) work with Splunk on any platform. I don't know about old-school Mac (CR) style, though, so don't use those.
  • The various Splunk distributions install with their native line endings.
  • About the same. I would pick Unix-style. Notepad hates it, but Wordpad handles it fine. vim can read either kind, but if you're on Solaris or AIX you don't always have vim, just vi, but the extra CR at the end of the line is just whitespace anyway.
link

answered 18 Aug '10, 04:17

gkanapathy's gravatar image

gkanapathy ♦
24.1k1620
accept rate: 43%

1

Agreed. I primarily use Unix EOLs in our custom apps which are deployed across platforms, and that has worked well. The notepad thing is an annoyance, but generally you shouldn't do any editing on the deployment client anyways (since any changes would be overwritten on the next deployment). It is a pain when you just want to quickly view a config file. ;-(

(18 Aug '10, 13:38) Lowell ♦

What do vi users see when they open a Windows-line-ended file? Is the file not editable or not viewable?

(19 Aug '10, 05:36) Justin Grant

A ^M (i.e., CR) character at the end of every line.

(19 Aug '10, 14:00) gkanapathy ♦

here is a related, very useful question/answer: http://answers.splunk.com/questions/6369/halp-my-nix-deployment-server-is-propagating-corrupted-configuration-files-to-m

(02 Sep '10, 18:20) piebob ♦♦
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:

×327
×202
×31
×1

Asked: 18 Aug '10, 03:57

Seen: 817 times

Last updated: 18 Aug '10, 13:39

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