Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute the output of previous command line

Tags:

linux

shell

I need to execute the result of a previous command, but I don't know how I can process.

I have a first command that returns an instruction to log in to the server and then I want to execute it just after.

my-first-command returns: docker login ...

For example:

> my-first-comnand | execute the result of my-first-command

like image 668
Victor Avatar asked Oct 24 '25 20:10

Victor


1 Answers

This should do it I believe.

my-first-command | bash

like image 84
Mattias Hermansson Avatar answered Oct 26 '25 10:10

Mattias Hermansson