BASH Daily — Get Google Chrome Bookmarks With The Terminal

Jean-Nicolas Boulay
1 min readMar 27, 2019

--

Basically:

Many things are happening here.

First, we get the content from Google Chrome Bookmark file. The content is in JSON format. An easier way to access the content and work with it in the terminal is to use jq. For more information on this tool: https://stedolan.github.io/jq/.

But I love the hard way!

Next, I filter in just the lines that contain name and URL with the help of grep (https://linux.die.net/man/1/grep).

The following code I try to simulate the output of sqlite3.

This awk (https://linux.die.net/man/1/awk) script at the end shows some of the more complicated things you can do with it. There I use BEGIN, the middle, and the END parts while using variables to pass values from one routine to another.

--

--