MyNixOS website logo
Description

Command line file filtering with haskell.

A tool to let you use short haskell expressions to filter files at the command line.

What is eddie?

A command line tool for running Haskell functions over text files.

It is also useful for prototyping Haskell text processing functions that you will later copy into a program.

Why is eddie?

This project actually started in response to a code bounty for a clojure shell scripting tool. That resulted in a specification for the requested program that had all the features of eddie, and then some. However, clojure code embedded on the command line looks clumsy, so the project was shelved.

In haskell, functional expression are much simpler and more elegant. In particular, in looking for haskell command line tools, I found http://www.haskell.org/haskellwiki/Simple_unix_tools, which convinced me that the original design would be not merely usable, but elegant if the expressions were done in haskell. Hence, eddie.

Why not ghc -e?

Eddie adds features to make using it for shell scripting easier:

  • When given file arguments, eddie feeds them to your function.
  • Eddie can easily add modules to the namespace you use.
  • Eddie has options for processing things a line or file at a time.
  • Eddie uses either Text or ByteStrings by default, not lists of characters.

More information

The best place to start is the manual. That's available in the source tree in both man format in eddie.1, and in html in eddie.html. The latter is also available online.

Installation

Install or build with cabal as usual.

Testing

Testing is done with the haskell shelltestrunner package (which can be installed with cabal). Run shelltest tests in the source directory to run the tests with the currently installed eddie. Use shelltest tests -w eddie.hs to run them using the current source. Use shelltest tests -w dist/build/eddie/eddie to run them with the compiled binary.

Documentation

The documenation is built with pandoc from eddie.md. Use the -s flag, and convert from pandoc's markdown to your chosen format.

Metadata

Version

1.0.0

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows