Skip to content

Instantly share code, notes, and snippets.

@SimonSchubert
Created October 31, 2015 01:42
Show Gist options
  • Save SimonSchubert/7db4209ebac7ffded840 to your computer and use it in GitHub Desktop.
Save SimonSchubert/7db4209ebac7ffded840 to your computer and use it in GitHub Desktop.
Create linux man page html file
#!/bin/bash
DATABASE="/home/simon/Dev/projects/LinuxCommandBibliotheca/app/src/main/assets/databases/commands.db"
id=10
manpage="$(sqlite3 $DATABASE "SELECT manpage FROM commands WHERE _id=$id")"
title="$(sqlite3 $DATABASE "SELECT name FROM commands WHERE _id=$id")"
category="$(sqlite3 $DATABASE "SELECT category FROM commands WHERE _id=$id")"
echo $manpage > $title"_"$category".html"
echo $title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment