The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 4,938     Votes:  2 
Tags: command-line   bash   scripts  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

Title: Execute a script when the output of a command has a specific string
ID: /2018/07/29/Execute-a-script-when-the-output-of-a-command-has-a-specific-string
Created: July 29, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

I would use this:

[[ $(Command1) == 1234 ]] && Command2


⇧ running two commands from a single terminal Unable to wake with external keyboard while lid is closed  ⇩