Computer Communication & Consulting

ZMgrep - Linux Tool for ZMzettelkasten

last change 2008-04-06

ZMgrep - simple grep (search) Tool for ZMzettelkasten

ZMgrep V 0.2 is available Download

German version of this page - click on flag or here.

This small command line tool greps thru ZMzettelkasten-Files (File Version should be 2.6).

If you are working with more then just one slip-box it will be nice to find out if there is an information about a specific word or text string inside one of the slip-boxes.

The standard Unix grep treads ZMzettelkasten files as binary and does not realy work with them. ZMgrep is espacialy written for diong that job with this special file format.

$ ZMgrep linux ~/daten/zettelkasten/*.zkx

The exsample abouve shows how a grep for the word linux is done. All Files containing "linux" in the title or textof a slip will be listet. The search is not case dependend.

Options of ZMgrep

The syntax of ZMgrep is ZMgrep [opt] "pattern" filename
If pattern contains special characters like Blanks or characters with special meanings to the Shell, pattern needs to be placed in double quotes.

$ ZMgrep "linux system" ~/daten/zettelkasten/*.zkx

In this example ZMgrep will search for the exact string "linux system". It is a simple string search and does not allow AND or OR conditions.

Valid options are:
-? or -h for Online Help
-l lists Title (Header) of the matching Slips
-v lists the Header informationen containt in the File.


$ ZMgrep -l linux technik.zkx
    10 - Links zu Programm Beispielen
    12 - Linux LAN
    13 - Sony C1MGP - sync@home
    14 - bash
    19 - rsync und vfat
    22 - Ubuntu & Co.
    25 - Qemu
    27 - Linux wlan
    28 - cc-c LAN
    30 - Bluetooth
    51 - bash quickies

At first the filename is printed and then the Slip numbers plus their Titles.

$ ZMgrep -v linux technik.zkx
-->technik.zkx - Version2.6
   Desc: Zettelkasten für Technik
   Anzahl Zettel = 51
The option -v lists the Information from the File header ... independend if pattern matches to some entry in file. (pattern is required by the program even if it is not processed). First the File name and version is listet an after Desc: the Metadata of the file header is printed.

Download ZMgrep Version 0.2

Terms of use:

The program is Freeware and your are able to download and use without any fee. You are using the program on your own risk. I am not responsible for any data losses and/or data corruptions.

Before you offer this program on your web-site for download or put it onto a CD for distribution please contact me for an allowance. It like to know what's going on.

(c) 2007-2008 Bernd Holzhauer

download ZMgrep - size 12kB - executable Binary for Linux command line.
Just execute ./ZMgrep dateiname after Download.

Best practice is to place the program with sudo cp ZMgrep /usr/local/bin into the /usr/local/bin dirctory.

With downloading and/or using the program you accept the »Terms of use« above.

Questions, Suggestions or Error descriptions? Please email to me.

Home Page
Copyright © 2001-2010 Bernd Holzhauer. All Rights reserved.
Possibly used Trademarks are Properties of their owners.