* Beautify and reformat a complicated shell script with Emacs for readability.
@ 2021-01-29 14:02 Hongyi Zhao
0 siblings, 0 replies; only message in thread
From: Hongyi Zhao @ 2021-01-29 14:02 UTC (permalink / raw)
To: help-gnu-emacs
I have a shell script which includes the following complicated code snippet:
while :; do
curl -X POST https://dnsapi.cn/Record.Ddns \
-d "$(
curl -s -X POST https://dnsapi.cn/Record.List \
-d
'login_token=id,tocken&format=json&domain=hyddns.xyz&sub_domain=free'
|
jq '
"login_token=209395,153bdabe92e6c4212280b7a764967a72&format=json&domain_id="
+ .domain.id
+ (.records[] | select(.name == "free") |
"&record_id=" + .id + "&record_line_id=" + .line_id +
"&sub_domain=free" )
' |
sed -re 's/^"//;s/"$//'
)" | jq .
sleep 30
done
I want to beautify and reformat this complicated code snippet with
Emacs automatically for readability. Is it possible?
Regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-29 14:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-29 14:02 Beautify and reformat a complicated shell script with Emacs for readability Hongyi Zhao
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.