Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle tab-separated values better #3

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

anders-larsson
Copy link

Example:

sysctl::base::values:
  kernel.sem:
    value: '500 256000 32 8192'

Currently it is not idempotent because sysctl -n returns 500\t256000\t32\t8192 (hard tabs) and not sspace separated as the input value. This pull request uses tr to remove any extra spaces and hard tabs and replaces them with one space in between every value.

Inspired by thias#76 but uses tr instead of sedbecause it looks nicer IMHO.

Copy link

@Phil-Friderici Phil-Friderici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, doesn't matter if it uses sed or tr :)

@anders-larsson anders-larsson merged commit d37daa5 into master Dec 12, 2023
8 checks passed
@anders-larsson anders-larsson deleted the handle_tabs_values branch December 12, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants