New! The Potato Stock Exchange is open. Get in early! New! Try the new dashboard!

#pipe

Pipe commands

Connect (pipe) multiple commands together in a chain where the output of the first is the input of the next. Use {0}, {1+} to insert specific sections of the last command output into the next command. Special characters (quotes, backticks, backslashes) are automatically escaped for safe use in JS and other commands. Prepend ? to the beginning of a command to conditionally stop the chain if the last command did not error, useful for handling error cases. Prepend ! to the beginning of a command to ignore the last command's output, only executing the next command. Use {^0+}, {^1}, {^^0} to insert specific sections of the parent (or parent's parent) command's input into the next command.

Usage

#pipe <command1> | <command2> {0+} |? <command2> {1} {2+} ...

<angle brackets> are required [square brackets] are optional flags change what it does

Arguments

  • commands Optional Text, the rest of the message

    The commands to chain, separated by |

Flags 1

  • -force -f Switch

    If a command fails, continue the chain anyway. Must be used in the first command.

    #pipe -force <command1> | <command2> | ...

Examples 2

Pass the output of one command into another

InflatingWizard844:#pipe reverse potato | spongebob
PotatBotat:oTaToP

Insert only the first word of the last output

FartingCupcake:#pipe reverse -a big spud | spongebob {0}
PotatBotat:sPuD