On Tue, 23 Apr 2024 10:59:47 +1000, Andrew Rowley wrote:
> ...
>To me, it is much clearer to be explicit, including the concatenation, e.g.
>"DELETE " || foo
>seems much clearer about exactly what is happening/expected, which are
>variables and which are (expected to be) constant etc.
>
That overkill is apt to confuse a POSIX shell partisan who would
see the blank as part of the command name and expect a
failure such as:
813 $ 'rm ' foo
-bash: rm : command not found
814 $
The maxim is assume your readers have a moderate, not
advanced, knowledge of the language and make little
concession to conventions of other languages. Don't:
'DELETE' || ' ' || value( 'foo' )
My stumbling block learning Shell was excessive familiarity
with CMS, where command strings built by Rexx are parsed
again by SVC 202. I tried to build command strings with sh
to pass to a nonexistent subsequent parser. I got better in
a couple days.
--
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN