Skip to content

How to grep the progress bar? #307

@shoopdawoop

Description

@shoopdawoop

A bit off topic perhaps, but I'll give it a shot:

I would like to run mas install in a shell script and report back when a download is finished and when it's successfully installed, but I cannot figure out how to do the former.

I thought I'd try a simple grep on the output, but only a mas install | grep "Installed" works (on the final output after the whole process is finished), while a mas install | grep "Installing" does not work.

It seems that the the output of the progress bar

################################################------------ 80.0% Installing

never gets piped to grep and only the final results ==> Downloading and ==> Installed actually get passed.
Throwing a | tee $somewhereelse in there does not work, either.

How can this be done?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions