3 ms·
> Try doing THAT with any other CLI one-liner! Challenge accepted. cat earthporn.json | \ jshon -e data -e children -a -e data -e title -u | \ sed
by keenerd 14y ago
> Try doing THAT with any other CLI one-liner!
Challenge accepted.
cat earthporn.json | \
jshon -e data -e children -a -e data -e title -u | \
sed -r 's/\<./\U&/g' | tr -d ' ' | sed 's/[^a-zA-Z].*//g`
I'll stick with Jshon for my routers and other little ARM devices.
But this utility is pretty nifty. Personally the whole select thing feels a little too magic for my taste, but when it works it looks quite compact. I'll probably be borrowing that colorizing feature tomorrow. And thanks for the link at the bottom :-)
- ralph 14y agoNice to see tr getting some use, though given the sed on either side I wonder if sed -r 's/\<./\U&/g; s/ +//g; s/[^a-zA-Z].*//' would be better. Note, the last s/// doesn't need a g.