How to save to file the content of a shell or bash

Posted on May 11, 2022

Here a little tip to save a long log in as terminal shell or bash:

your-command | tee file.txt

For example I want to save the list of all keys present in a CloudFlare KV namespace:

wrangler kv:key list --binding=my-kv | tee out.json