1. Parsing Command Line Options in Shell Scripts

    In programs written in C, command line argument parsing has always been done using the getopt(3) library function. This function has set the standards Linux/Unix users have come to expect from command line interfaces. Fortunately, there's a getopt(3) equivalent for almost every programming language and the shell …

    read more
  2. Building RPMs Without Root Access

    This week at work I had the opportunity to build an RPM for some third-party software package.

    My previous experiences with RPM date back to SuSE 5 almost ten years ago and I haven't touched it ever since. Packaging for Debian or even NetBSD is mostly a painless process, so …

    read more
  3. Changing Directories Quickly

    When you work with the interactive shell, there's a common pattern that is used a lot: Copying or moving files to a directory and then changing to the target directory using cd. In these cases, you find yourself typing the name twice:

    $ cp file1 file2 file3 /very/long/path/name …
    read more
  4. Controlling Firefox via Command Line

    Mozilla-based browsers like Firefox have inherited a useful feature from the good old Netscape Navigator: Controlling a running browser instance via the command line. Using command line options, you can open URLs or files inside your browser window without having to enter them in the address bar.

    Suppose you're working …

    read more
  5. Printing RFCs and Internet Drafts

    The a2ps command line utility converts text files to PostScript which can then be sent to a printer. The resulting output contains all kinds of boxes and additional information which limits the space on the printed page to make your own notes.

    Of course, this can all be turned off …

    read more
  6. Using D-Bus Introspection

    To control a D-Bus-enabled application, you need the interface definition to find out which methods are offered and which parameters they expect.

    Of course, you can get the relevant interface definition from the application's source distribution. But there's an easier way: Ask the object in question via D-Bus to …

    read more

social