23 11 | 2016

Generate man pages for awscli

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

No man pages, but almost

The AWS Command Line Interface, which is available in Debian, provides no man page. Instead, that tool has an integrated help system, which allows you to run commands such as aws rds help, that, for what I have seen, generates some reStructuredText, then converts it to a man page in troff format, then calls troff to convert it to text with basic formatting, and eventually passes it to a pager. Since this is close to what man does, the result looks like a degraded man page, with some features missing such as the adaptation to the terminal width.

Well, this is better than nothing, and better than what many under-documented tools can offer, but for several reasons, it still sucks: most importantly, it does not respect administrators' habits and it does not integrate with the system man database. You it does not allow you to use commands such as apropos, and you will get no man page name auto-completion from your shell since there is no man page.

Read more Generate man pages for awscli

24 09 | 2013

Working with XML using standard Unix tools

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Like it or not, XML has been used everywhere, even in cases where text-based formats would have been sufficient. Unfortunately, standard tools such as grep, sed or awk are not really adapted to work with XML. Let us take the following example:

<chapter
    xmlns="http://docbook.org/ns/docbook" version="5.0">
    <title>The Debian distribution</title>

    <para>Debian is a free operating system, describing itself as “the
    universal operating system”. It is mostly known as a GNU/Linux
    distribution, but it also exist in other variants such as GNU/Hurd
    and GNU/kFreeBSD…</para>
</chapter>

Read more Working with XML using standard Unix tools

05 01 | 2013

rlwrap: give readline super powers to any command line tool

Written by Tanguy

Classified in : Homepage, Debian, Command line

Did you ever use a tool such as netcat, which has no history and does not allow you to edit the line you are typing?

% nc localhost smtp
220 cocorico.example.com ESMTP Postfix
HELO localhost
250 cocorico.example.com
MAIL FROM: <tanguy@localhost>
250 2.1.0 Ok
RCTP TO: <tanguy@localhost>
502 5.5.2 Error: command not recognized
^[[A Sh*t, line recall does not work!
502 5.5.2 Error: command not recognized

Read more rlwrap: give readline super powers to any command line tool

Archives