stockholm/lass/5pkgs/acronym/default.nix

14 lines
273 B
Nix
Raw Normal View History

2016-03-15 13:08:29 +00:00
{ pkgs, ... }:
pkgs.writeScriptBin "acronym" ''
#! ${pkgs.bash}/bin/bash
acro=$1
curl -s http://www.acronymfinder.com/$acro.html \
| grep 'class="result-list__body__rank"' \
| sed 's/.*title="\([^"]*\)".*/\1/' \
| sed 's/^.* - //' \
| sed "s/'/'/g"
''