From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Beautify and reformat a complicated shell script with Emacs for readability.
Date: Fri, 29 Jan 2021 22:02:16 +0800 [thread overview]
Message-ID: <CAGP6POL0n2uLhLNoo3JeqbiYH4=pst8XaQNp1PJYcfpFDNiWfQ@mail.gmail.com> (raw)
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
reply other threads:[~2021-01-29 14:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGP6POL0n2uLhLNoo3JeqbiYH4=pst8XaQNp1PJYcfpFDNiWfQ@mail.gmail.com' \
--to=hongyi.zhao@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.