3 ms·
Only using curl: WARNING: Replace ASTERISK with the asterisk character, keeps italicizing -.- curl -s randomfunfacts.com | grep '<i>' | sed 's/.ASTERISK<i>\(.
by JReptak 14y ago
Only using curl:
WARNING: Replace ASTERISK with the asterisk character, keeps italicizing -.-
curl -s randomfunfacts.com | grep '<i>' | sed 's/.ASTERISK<i>\(.ASTERISK\)<\/i>.*/\1/'
- JReptak 14y agoOr better yet add color: WARNING: REPLACE ASTERISK with the ATERISK character, keeps italicizing alias facts="echo -ne '\033[36m'; curl -s randomfunfacts.com | grep '<i>' | sed 's/.ASTERISK<i>\(.ASTERISK\)<\/i>.*/\1/'; echo -ne '\033[0m'; tput sgr0" And run it in BG so we don't have to wait for call to website before we pull alias gpl="( facts ); git pull"
- paulbaumgart 14y agoPrepending two spaces to a line will prevent ***automatic formatting***.
- cpeterso 14y agocurl -s randomfunfacts.com | grep '<i>' | sed 's/.*<i>\(.*\)<\/i>.*/\1/'
- devgutt 14y agoyou don need to use grep, only sed -n