I'm preparing an automated bash script, and during the execution, I intend to first convert a Metadata API repository to DX formatted structure and then push it into a Scratch org.

For example, executing commands such as sfdx force:mdapi:convert and sfdx force:source:push, after successful execution, displays list of all files pushed or converted via the command. Now, since the repository is large one, some important information I wanted to be posted in the terminal, since it scrolls the terminal too much.

Can we execute following commands and hide the summary of files being pushed/converted?


You can save the output in a separate file like this

sfdx force:source:push --json > pushed_sources.json

This has two advantages: the output remains clear and you have persistent debug capabilities if needed

  • 1
    May need to also redirect stderr with >& – Phil W Apr 24 '20 at 10:01
  • Sry, not really too fluent with bash scripting. What does this mean and where it could be used? – VarunC Apr 24 '20 at 10:59
  • 1
    Good point Phil. That means if an error occurs in the given example (cannot push source for some reason), you would still see the error occurring directly in your output - so it depends if this should be the expected behaviour or not. If you just want to redirect all output including all errors you can use the syntax Phil posted in his comment. See also stackoverflow.com/questions/11255447/what-does-mean – Christian Menzinger Apr 24 '20 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.