https://github.com/mariazevedo88/json-formatter
Linux Shell Script to format a JSON file
https://github.com/mariazevedo88/json-formatter
bash-script json json-formatters linux shell-script
Last synced: 7 months ago
JSON representation
Linux Shell Script to format a JSON file
- Host: GitHub
- URL: https://github.com/mariazevedo88/json-formatter
- Owner: mariazevedo88
- License: gpl-3.0
- Created: 2019-01-05T00:31:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-05T01:12:30.000Z (almost 7 years ago)
- Last Synced: 2025-01-27T10:45:03.980Z (8 months ago)
- Topics: bash-script, json, json-formatters, linux, shell-script
- Language: Shell
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-formatter
Shell Script para formatar um arquivo JSON.
Linux Shell Script to format a JSON file.
# Dependências / Dependencies
É necessario ter o `jq` instalado em sua máquina.
Must have `jq` installed.
* Linux: `sudo apt-get install jq`
* Windows: `https://stedolan.github.io/jq/`## Como usar / How to use
No terminal, executar o comando:
`./json-formatter.sh "pasta de origem" "nome do arquivo"`
At the terminal, run the command:
`./json-formatter.sh "source folder" "file name"`
### Descrição dos parâmetros
1-Pasta de origem (onde o arquivo se encontra). Exemplo: `home/mariana/formatter`
2-Nome do arquivo. Exemplo: se temos um arquivo `relatorio.json`, o nome deve ser `relatorio`.`./json-formatter.sh home/mariana/formatter relatorio`
O resultado, após a execução do script é um novo arquivo .json formatado. Exemplo: `relatorio.fmt.json`.
### Parameters description
1- Source folder (where the file is located). Example: `home/mariana/formatter`
2- File name. Example: if we have a file `report.json`, the name must be `report`.The result, after running the script is a new formatted .json file. Example: `report.fmt.json`.