Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #7746

Is bash.sh compiled or interpreted?

From Avoid9Pdf@gmail.com
Newsgroups comp.os.linux.misc, comp.os.linux.networking
Subject Is bash.sh compiled or interpreted?
Date 2013-04-03 20:11 +0000
Organization A noiseless patient Spider
Message-ID <kji2dk$cs2$1@dont-email.me> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


My previous query has exposed much of my confusion.
Pascal B's smpt.sh:-----------
...<initialise variables>
  cat>$message
(
    read line 0<&3 ; $trace "$line">$log
    case "$line" in 2*) ;; *) echo "QUIT" 1>&3 ; exit 0 ;; esac
    echo "HELO $local_name" 1>&3
    read line 0<&3 ; $trace "$line">$log
    case "$line" in 2*) ;; *) echo "QUIT" 1>&3 ; exit 0 ;; esac
    echo "MAIL FROM: <${from}>" 1>&3
...
    echo "QUIT" 1>&3
) 3<>/dev/tcp/$smtp_server/25 
-----------------------

Is it right that FD3 is bound to "/dev/tcp/$smtp_server/25"
only at the last line of the script, whereas FD3 is USED
in previous lines; 
so that the complete script must be compiled before the
<implementing code> is generated ?

So that this presents a very unnatural mental model for users
who are used to scientific or legal thinking, where the text
can be confirmed as being valid at intermediate stages?
----
Per Joe Beanfish;
cat>$message
 means 'read from stdin and write that to File:message'.
 
Is this completed before the (instruction-sequence starts),
because `read line` will use stdin?
So what's the point of `cat>$message` ?
Is it just to write a little introduction, before the actual task
starts?

Do readers understand the WHOLE script as implementing
a mail-client -- other than just snippets? 
And how it would it be decomposed into testable parts?

What are possible successive refinement versions of test 
scripts for this task.  I.e the 'hello world model' must be used.
Ie. each version must be stand-alone-complete, and
extended by later versions.

== TIA.
 




Back to comp.os.linux.misc | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Is bash.sh compiled or interpreted? Avoid9Pdf@gmail.com - 2013-04-03 20:11 +0000
  Re: Is bash.sh compiled or interpreted? J G Miller <miller@yoyo.ORG> - 2013-04-03 21:10 +0000
    Re: Is bash.sh compiled or interpreted? The Natural Philosopher <tnp@invalid.invalid> - 2013-04-03 22:34 +0100
      Re: Is bash.sh compiled or interpreted? unruh <unruh@invalid.ca> - 2013-04-04 04:40 +0000
        Re: Is bash.sh compiled or interpreted? Allodoxaphobia <knock_yourself_out@example.net> - 2013-04-04 14:01 +0000
    Re: Is bash.sh compiled or interpreted? Avoid9Pdf@gmail.com - 2013-04-04 19:12 +0000
      Re: Is bash.sh compiled or interpreted? Richard Kettlewell <rjk@greenend.org.uk> - 2013-04-04 20:43 +0100
        Re: Is bash.sh compiled or interpreted? orcus@pwr.wroc.pl - 2013-04-05 03:43 +0000
          Re: Is bash.sh compiled or interpreted? Jerry Peters <jerry@example.invalid> - 2013-04-05 19:54 +0000
      Re: Is bash.sh compiled or interpreted? unruh <unruh@invalid.ca> - 2013-04-04 22:55 +0000
        Re: Is bash.sh compiled or interpreted? Richard Kettlewell <rjk@greenend.org.uk> - 2013-04-05 09:12 +0100
          Re: Is bash.sh compiled or interpreted? unruh <unruh@invalid.ca> - 2013-04-05 16:35 +0000
            Re: Is bash.sh compiled or interpreted? Richard Kettlewell <rjk@greenend.org.uk> - 2013-04-05 17:50 +0100
        Re: Is bash.sh compiled or interpreted? J G Miller <miller@yoyo.ORG> - 2013-04-05 16:02 +0000
          Re: Is bash.sh compiled or interpreted? Jerry Peters <jerry@example.invalid> - 2013-04-05 19:58 +0000
        Re: Is bash.sh compiled or interpreted? Unknown <dog@gmail.com> - 2013-04-05 19:44 +0000
          Re: Is bash.sh compiled or interpreted? Jerry Peters <jerry@example.invalid> - 2013-04-05 19:51 +0000
      Re: Is bash.sh compiled or interpreted? Surinder <Surinder.Singh@example.net> - 2013-04-09 11:20 +0530
  Re: Is bash.sh compiled or interpreted? Joe Beanfish <joebeanfish@nospam.duh> - 2013-04-08 14:37 +0000
    Re: Is bash.sh compiled or interpreted? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2013-04-08 21:08 +0300

csiph-web