Last active
February 22, 2023 16:57
-
-
Save joshtrichards/a060b79001426e524a5335035f468d6f to your computer and use it in GitHub Desktop.
Revisions
-
joshtrichards revised this gist
Feb 22, 2023 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,12 @@ Calculate how many entries have had their password changed since a particular da `bw list items | jq '.[] | select(.login.passwordRevisionDate >= "2023-01-01")' | jq -s length` Calculate how many entries have had their password changed in the last "X days": ``` DAYS_AGO=`date -d"30 days ago" +%Y-%m-%d` bw list items | jq -r --arg DAYS_AGO "$DAYS_AGO" '.[] | select(.login.passwordRevisionDate >= $DAYS_AGO)' | jq -s length ``` Sort all entries by revisionDate: `bw list items | jq '. |= sort_by(.revisionDate)'` -
joshtrichards revised this gist
Feb 22, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Find all entries that have integrated TOTP configured: Calculate how many entries have integrated TOTP configured: `bw list items | jq '.[] | select(.login.totp != null)' | jq -s length` Find all entries that *don't* have integrated TOTP configured: -
joshtrichards created this gist
Feb 22, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ Find all entries that have integrated TOTP configured: `bw list items | jq '.[] | select(.login.totp != null)'` Calculate how many entries have integrated TOTP configured: bw list items | jq '.[] | select(.login.totp != null)' | jq -s length Find all entries that *don't* have integrated TOTP configured: `bw list items | jq '.[] | select(.login.totp == null)'` Calculate how many entries *don't* have integrated TOTP configured: `bw list items | jq '.[] | select(.login.totp == null)' | jq -s length` Find all entries that had their password changed since a particular date: `bw list items | jq '.[] | select(.login.passwordRevisionDate >= "2023-01-01")'` Calculate how many entries have had their password changed since a particular date: `bw list items | jq '.[] | select(.login.passwordRevisionDate >= "2023-01-01")' | jq -s length` Sort all entries by revisionDate: `bw list items | jq '. |= sort_by(.revisionDate)'` Find all entries with a particular username (login): `bw list items | jq '.[] | select(.login.username == "[email protected]")'` Find all entries that have notes specified: `bw list items | jq '.[] | select(.notes != null)'` Find all entries that have notes specified and spit out just the notes: `bw list items | jq '.[] | select(.notes != null)' | jq .notes`