bash combine commands
# Basic syntax: # This will run command_2 after command_1 regardless of whether command_1 # completes successfully or not: command_1; command_2 # This will run command_2 after command_1 if command_1 completes successfully: command_1 && command_2 # This will run command_2 after command_1 if command_1 fails: command_1 || command_2 # This will pass (pipe) the standard output of command_1 to command_2: command_1 | command_2
Source: dev.to
combine commands bash
# Just use next format to combine 2 commands output in pipeline { command1 & command2; } #For example you can grep between output of 2 different commands ;) { command1 & command2; } | grep match_pattern