recsel

Print records from a recfile: a human-editable, plain text database. More information: <https://www.gnu.org/software/recutils/manual/recutils.html>.

Install

All systems
curl cmd.cat/recsel.sh
Debian Debian
apt-get install recutils
Ubuntu
apt-get install recutils
image/svg+xml Kali Linux
apt-get install recutils
Fedora
dnf install recutils
Windows (WSL2)
sudo apt-get update sudo apt-get install recutils
OS X
brew install recutils
Raspbian
apt-get install recutils

Print records from a recfile: a human-editable, plain text database. More information: <https://www.gnu.org/software/recutils/manual/recutils.html>.

  • Extract name and version field:
    recsel -p name,version data.rec
  • Use "~" to match a string with a given regular expression:
    recsel -e "field_name ~ 'regular_expression' data.rec"
  • Use a predicate to match a name and a version:
    recsel -e "name ~ 'regular_expression' && version ~ 'regular_expression'" data.rec

© tl;dr; authors and contributors