3 ms·
So I fed it : cat ./trunk/.config |awk ' /CONFIG_TARGET_BOARD/ { gsub(/\"/,""); split($0,a,"="); print a[2] }' A little one-liner I worked up a few days ago
by noonespecial 13y ago
So I fed it :
cat ./trunk/.config |awk ' /CONFIG_TARGET_BOARD/ { gsub(/\"/,""); split($0,a,"="); print a[2] }'
A little one-liner I worked up a few days ago to quickly show me which architecture my OpenWRT trunk was last built with. I'd really like it to explain in much more detail what each of the terms inside the awk command do. Perhaps make "explain" modular so that people can add more detail to the gazillion things that can happen inside awks, seds, greps, etc?
Fabulous idea. This should have been in unix all along as part of the man system.
- angersock 13y agoThat'd be brilliant. We should have a `wtf?` command, used like so: wtf? yes | sudo apt-get install libpq-dev Results would be ncurses, top line of screen is command with current subcommand highlighted, and rest of screen is less'ed explanation.
- idank 13y agoIt's definitely doable to add dedicated parsers for options of awk, sed, et al. But it's a lot of work... I doubt someone will go through the trouble of writing a parser for awk, just for this.. What is possible and quite easy is creating links for things that are explained in other tools, such as linking the regex argument of grep to some site that explains regular expressions, or somehow integrate it into the existing UI.