Hide command and get only output in shell

99 views Asked by At

I am working on pressly/goose tool for migration. All my commands run from shell script file inside docker container. I wanted to hide certain command or password from the console output logs.

Here is the command,

goose postgres "user=postgres password=postgres dbname=postgres sslmode=disable" status

I have tried stty -echo | command | stty echo this also.

Is there any way to hide command/password and only shows the output of that command?

0

There are 0 answers