gnugmanov SNOW 2334154 sanssh clean output#593
Open
sfc-gh-gnugmanov wants to merge 2 commits intomainfrom
Open
gnugmanov SNOW 2334154 sanssh clean output#593sfc-gh-gnugmanov wants to merge 2 commits intomainfrom
sfc-gh-gnugmanov wants to merge 2 commits intomainfrom
Conversation
b682ca5 to
05c0569
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add --clean-output to strip prefixed metadata from output lines
Add newline-aware cleaner GetCleanOutputWriter in services/util/writer
that removes everything up to the first space on each line
Wire cleaner into cmd/sanssh/client/client.go; apply cleaning before
optional prefixing (-h) so sanssh’s prefix remains intact
Add --clean-output flag in cmd/sanssh/main.go and pass via RunState
Mark --clean-output as important so it appears in sanssh help
Update examples/docs to reflect ${random-number}-${ip}:9500: prefix
format (dash between number and IP)
Add TestCleanWriter and keep existing writer tests passing
Usage:
./sanssh --targets=host1 --clean-output file read /var/log/app.log
Behavior:
"123-10.0.0.1:9500: some_output_strings" -> "some_output_strings"