-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
I'm doing a test which needs to take the output of one command as an input for the next.
Short of using temporary files I have no way of achieving this within the test script.
It would be a nice feature, if we could e.g. refer to (ideally a regex match) of stdout (or stderr) of the last command, or support pushing such a match to a variable name.
Maybe something like:
$ myapicli --getsession
> /([0-9]*)/sid=$1
>= 0
$ myapicli --getitem --sid=${sid}
> /\w+/
>= 0
Even better if one could do multiple matching groups like so:
> /([0-9]*)\s+([0-9]*)/num1=$1;num2=$2
# or with some separator or different assignment of course