commands.sh

slackcat

all

Utility for passing files and command output to Slack.

More info →

Options (3)

-c, --channelboolean

Post a file to Slack

Example: slackcat {{[-c|--channel]}} {{channel_name}} {{path/to/file}}
-n, --filenameboolean

Post a file to Slack with a custom filename

Example: slackcat {{[-c|--channel]}} {{channel_name}} {{[-n|--filename]}} {{filename}} {{path/to/file}}
-s, --streamboolean

Stream command output to Slack continuously

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

Examples (4)

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]
made by @shridhargupta | data from tldr-pages