stockholm/lass/5pkgs/acronym/default.nix
2017-09-20 18:17:19 +02:00

17 lines
285 B
Nix

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