Quick scripts to plunge through the JSONs.
This commit is contained in:
parent
ea80d8434b
commit
1046af946a
3
files_for.sh
Executable file
3
files_for.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
jq -r ".MCUs[] | select(.RPN == \"$1\") | .files[].file_id" sources/mcufinder/mcus.json
|
11
rm_for.sh
Executable file
11
rm_for.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
#jq ".MCUs[] | select(.RPN == \"$1\") | .files[].file_id" sources/mcufinder/mcus.json
|
||||
|
||||
files=$(./files_for.sh $1)
|
||||
|
||||
#echo $files
|
||||
for candidate in $files
|
||||
do
|
||||
jq -e ".Files[] | select(.id_file == \"$candidate\") | select(.type == \"Reference manual\")" ./sources/mcufinder/files.json
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user