l 5 acronym: refactor code
This commit is contained in:
parent
9717e5a2e0
commit
2e87439340
@ -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
|
||||
'
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user