do not print empty file lines with jq
This commit is contained in:
parent
e3e073998f
commit
dd71cee26e
@ -60,7 +60,7 @@ scan(){
|
|||||||
echo "$line" >> "$TMP_URLFILE"
|
echo "$line" >> "$TMP_URLFILE"
|
||||||
mkdir -p "$dl_location"
|
mkdir -p "$dl_location"
|
||||||
fi
|
fi
|
||||||
files_json="$(jq '.posts[] | if has("filename") then {filename: "\(.no)_\(.filename)\(.ext)", location: "\(.tim)\(.ext)", md5: .md5} else null end ' < /tmp/content$$ | grep -vE '^null$')"
|
files_json="$(jq '.posts[] | if has("filename") then {filename: "\(.no)_\(.filename)\(.ext)", location: "\(.tim)\(.ext)", md5: .md5} else empty end ' < /tmp/content$$ )"
|
||||||
rm /tmp/content$$
|
rm /tmp/content$$
|
||||||
#pastes together a multiline var using process substitution with
|
#pastes together a multiline var using process substitution with
|
||||||
#layout: filename location md5
|
#layout: filename location md5
|
||||||
|
Loading…
Reference in New Issue
Block a user