HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

slackcat — Utility for passing files and command output to Slack. More information: <https://github.com/bcicen/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
passingcommandfilesandslackcatcliforutility

Problem

How to use the slackcat command: Utility for passing files and command output to Slack. More information: <https://github.com/bcicen/slackcat#usage>.

Solution

slackcat — Utility for passing files and command output to Slack. More information: <https://github.com/bcicen/slackcat#usage>.

Post a file to Slack:
slackcat {{[-c|--channel]}} {{channel_name}} {{path/to/file}}


Post a file to Slack with a custom filename:
slackcat {{[-c|--channel]}} {{channel_name}} {{[-n|--filename]}} {{filename}} {{path/to/file}}


Pipe command output to Slack as a text snippet:
{{command}} | slackcat {{[-c|--channel]}} {{channel_name}} {{[-n|--filename]}} {{snippet_name}}


Stream command output to Slack continuously:
{{command}} | slackcat {{[-c|--channel]}} {{channel_name}} {{[-s|--stream]}}

Code Snippets

Post a file to Slack

slackcat {{[-c|--channel]}} {{channel_name}} {{path/to/file}}

Post a file to Slack with a custom filename

slackcat {{[-c|--channel]}} {{channel_name}} {{[-n|--filename]}} {{filename}} {{path/to/file}}

Pipe command output to Slack as a text snippet

{{command}} | slackcat {{[-c|--channel]}} {{channel_name}} {{[-n|--filename]}} {{snippet_name}}

Stream command output to Slack continuously

{{command}} | slackcat {{[-c|--channel]}} {{channel_name}} {{[-s|--stream]}}

Context

tldr-pages: common/slackcat

Revisions (0)

No revisions yet.