From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v9 2/5] Add script to generate arch(s) dependant syscalls
Date: Fri, 1 Nov 2024 12:30:19 +0100 [thread overview]
Message-ID: <20241101113019.GA1264676@pevik> (raw)
In-Reply-To: <20241101-generate_syscalls-v9-2-d2c3820b0323@suse.com>
Hi Andrea,
...
> + for syscall in $(cat ${TEMP}/syscall-names.txt); do
> + printf "
> + #ifdef __NR_$syscall
> + printf(\"$syscall %%d"
> + # i know the following print is ugly, but dash and bash
> + # treat double quoted strings in a different way and we
> + # really need to inject '\n' character in the C code
> + # rather than carriage return
> + printf '\\n'
> + printf "\", __NR_$syscall);
How about using heredocs? IMHO more compatible way of echo/printf "" for new
lines:
cat << EOF
...
EOF
I should have noted that at previous version.
Hint: looking into tst_test.sh can sometimes help.
Also there is echo/printf '' variant:
cat << 'EOF'
EOF
https://unix.stackexchange.com/questions/462593/how-to-escape-a-character-in-a-heredoc-bash-script/462595#462595
There is also ~EOF - ignore leading whitespace, even for terminating EOF.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-11-01 11:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 10:48 [LTP] [PATCH v9 0/5] Automatically generate syscalls.h Andrea Cervesato
2024-11-01 10:48 ` [LTP] [PATCH v9 1/5] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-11-01 10:48 ` [LTP] [PATCH v9 2/5] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-11-01 11:30 ` Petr Vorel [this message]
2024-11-01 13:23 ` Andrea Cervesato via ltp
2024-11-01 17:02 ` Petr Vorel
2024-11-01 10:48 ` [LTP] [PATCH v9 3/5] Update arch(s) syscalls files Andrea Cervesato
2024-11-04 8:05 ` Petr Vorel
2024-11-04 11:12 ` Cyril Hrubis
2024-11-01 10:48 ` [LTP] [PATCH v9 4/5] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-11-01 10:48 ` [LTP] [PATCH v9 5/5] Add documentation about syscalls.h generator Andrea Cervesato
2024-11-04 8:17 ` Petr Vorel
2024-11-04 12:25 ` Cyril Hrubis
2024-11-05 8:55 ` [LTP] [PATCH v9 0/5] Automatically generate syscalls.h Andrea Cervesato via ltp
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=20241101113019.GA1264676@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox