skip to Main Content

How to rip all of the emails from a JSON file using Terminal

This is posted here for people who want to use terminal to rip the emails from a JSON file.

 

Why would you want to do this? If you have your company chat support integrated with your slack channel, you can export your slack files as JSONs then bulk rip the emails once per week to invite these people to an online community once your create one for your brand.  If all of this sounds like gibberish hit the back button and exit the tech section of this blog.

  1. Open up terminal
  2. type in the following

ls

pwd

cd Downloads/                  or wherever you put the file

ls

cd TMDP \ Slack\ export\ Aug\ 8\ 2018                       or whatever you set as the file name

ls

cd chatsupport/                         or whatever you set as the file name

grep -o ‘[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*’ file name.json | sort | uniq -i

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top