Last active
November 3, 2021 08:16
-
-
Save shuuji3/12a65d5f56f7fade617a06f5467dcc85 to your computer and use it in GitHub Desktop.
Temporary solution for `mas list --json`. ref. Add option for retrieving information in JSON format · Issue #190 · mas-cli/mas - https://github.com/mas-cli/mas/issues/190
This file contains 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 characters
{"id": 497799835, "name": "Xcode (13.1)"} | |
{"id": 1423210932, "name": "Flow (2.7.5)"} | |
{"id": 1452453066, "name": "Hidden Bar (1.8)"} | |
{"id": 1475387142, "name": "Tailscale (1.16.1)"} |
This file contains 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 characters
for i in (mas list) | |
echo $i | python -c "import re; print(re.sub(r'(\d+)\s+(.+?)\s+(\(.+\))', r'{\"id\": \1, \"name\": \"\2 \3\"}', input()))" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment