diff options
author | lassulus <lass@aidsballs.de> | 2016-04-13 16:48:32 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-04-13 16:48:32 +0200 |
commit | 2e8743934061ecb8019c34ee4b1010238e158bf1 (patch) | |
tree | 90ff819cb846d643322b849e15b2541ecd63b0e6 /lass/5pkgs/acronym/default.nix | |
parent | 9717e5a2e0cb5b0bf9fae0ec62423af30ecd2051 (diff) |
l 5 acronym: refactor code
Diffstat (limited to 'lass/5pkgs/acronym/default.nix')
-rw-r--r-- | lass/5pkgs/acronym/default.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lass/5pkgs/acronym/default.nix b/lass/5pkgs/acronym/default.nix index 53d5d015a..9f6f95587 100644 --- a/lass/5pkgs/acronym/default.nix +++ b/lass/5pkgs/acronym/default.nix @@ -1,13 +1,16 @@ { 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" + | grep 'class="result-list__body__rank"' \ + | sed ' + s/.*title="\([^"]*\)".*/\1/ + s/^.* - // + s/'/'\'''/g + ' '' |