16 ms·
hey can someone explain how to use the bash-only version? it didnt work for me
by macscam 11y ago
hey can someone explain how to use the bash-only version? it didnt work for me
- voltagex_ 11y agoWhat error did you get?
- robertelder 11y agoHere is a version that is a bash 'one-liner' search="sort a list" && curl -s --compressed "https://api.stackexchange.com/2.2/questions/"`curl -s -G --data-urlencode "q=${search}" --compressed "https://api.stackexchange.com/2.2/search/advanced?order=desc&sort=relevance&site=stackoverflow" | python -c "exec(\"import sys \nimport json\nprint(json.loads(''.join(sys.stdin.readlines()))['items'][0]['question_id'])\")"`"/answers?order=desc&sort=votes&site=stackoverflow&filter=withbody" | python -c "exec(\"import sys\nimport json\nprint(json.loads(''.join(sys.stdin.readlines()))['items'][0]['body']).encode('utf8')\")"