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


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

Re: Is bash.sh compiled or interpreted?

From Avoid9Pdf@gmail.com
Newsgroups comp.os.linux.misc, comp.os.linux.networking
Subject Re: Is bash.sh compiled or interpreted?
Followup-To comp.os.linux.misc, comp.os.linux.networking
Date 2013-04-04 19:12 +0000
Organization A noiseless patient Spider
Message-ID <kjkja8$952$1@dont-email.me> (permalink)
References <kji5s8$31t$5@dont-email.me>

Cross-posted to 2 groups.

Followups directed to: comp.os.linux.misc, comp.os.linux.networking

Show all headers | View raw


In article <kji5s8$31t$5@dont-email.me>, J G Miller <miller@yoyo.ORG> wrote: 

> On Wednesday, April 3rd, 2013 20:11:33 +0000, Chris Glur pondered:
> 
> > Is bash.sh compiled or interpreted?
> 
> Bourne shell, bash shell, ksh, zsh, csh, tcsh etc scripts
> are all interpreted.
> 
> In your Bourne shell script put ``set -x'' at the top after the line
> 
> #! /bin/sh
> set -x
> 
> and you will see the script executed, line by line.

Without testing it:
<statements/commands> can extend over lines,
so <lines> can't execute atomically.

Since the <statements/commands> are potentially
nested, that further precludes line by line execution.

PLEASE boys! focus on the specific smtp.sh

cat>/mesgFile
(
    read line 0<&3 ; echo "$line">$log case "$line" in 2*) ;; *) echo
    "QUIT" 1>&3 ; exit 0 ;; esac echo "HELO $local_name" 1>&3
...55  similar lines ...
) 3<>/dev/tcp/$smtp_server/25

Based on Joe Beanfish's input,
it seems that the '(bracketed lines)' constitute a
nested-statement.

My main concern is whether the redirection: `3<>...`
'belongs' to the '(bracketed lines)' SPECIFICALLY.
And if so I'm waiting for a comment on my observation
that since the () could be a zilllion lines, it's a crappy
syntax to have the 'initialisation' at the END.

And obviously the script can't interpret/run line-by-line,
because it can't know what to do until the last line -- in
this case.

WDYS? 

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next 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