Sujet : Re: Command Languages Versus Programming Languages
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 30. Mar 2024, 02:49:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uu7nig$jpe8$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 30.03.2024 01:01, Keith Thompson wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
So what is 'for i in a ; do ... ; done' then in your world?
>
This is one of many basic shell constructs that I use in shell
programming (not "shell scripting") regularly.
I use it both in shell scripting/programming and interactively.
So do I. (To me there's no significant difference. Only that larger
projects I do not start to develop in interactive mode, of course.)
And the entire construct needs to be processed before the shell can
begin to execute it. Misspelling "done" prevents the whole thing from
running.
Indeed.
From the other posters statements I got the impression that he may
think that control constructs is what makes the difference (between
scripting and programming, or, command interpreters and programming
languages; still not sure what he thinks). In a later post I read
it as if the naming of e.g. 'for' as a "command" leads to his view.
Anyway.
I can see a point where people use for interactive use other shells
than for programming; like tcsh (interactively) and bash (programming),
because of the powerful features tcsh supports. Since the increase of
interactive features supported by the shells that are typically used
for programming I prefer to have the same shell with same syntax and
features for both, and to be able to pass code from one application
context to the other.
Janis