Re: Bash scripting -- Usage of arrays

From: John-Mark Gurney (gurney_j_at_resnet.uoregon.edu)
Date: 11/29/05

  • Next message: Jayesh Jayan: "Re: Bash scripting -- Usage of arrays"
    Date: Tue, 29 Nov 2005 14:09:54 -0800
    To: Jayesh Jayan <jayesh.freebsdlist@gmail.com>
    
    

    Jayesh Jayan wrote this message on Wed, Nov 30, 2005 at 03:19 +0530:
    > I already have bash installed from ports. It is bash 2.05b.

    But below you were running sh, and not bash... if you do sh array.sh,
    it will not reinterpet the #!/bin/bash line, and re-exec it with the
    program in part because /bin/bash doesn't exist on the system, as bash
    is installed in /usr/local/bin/bash...

    Please try with:
    bash array.sh
    instead, and see if that works..

    > On 11/30/05, John-Mark Gurney <gurney_j@resnet.uoregon.edu> wrote:
    > >
    > > Jayesh Jayan wrote this message on Wed, Nov 30, 2005 at 02:39 +0530:
    > > > Below is the output.
    > > >
    > > > # sh array.sh
    > >
    > > Install the bash port (as root: pkg_add -r bas), and then try again
    > > using bash...
    > >
    > > FreeBSD doesn't have bash installed by default (and hence, /bin/sh is
    > > not bash like it is usually on Linux), and our sh doesn't have that
    > > feature...

    -- 
      John-Mark Gurney				Voice: +1 415 225 5579
         "All that I will do, has been done, All that I have, has not."
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Jayesh Jayan: "Re: Bash scripting -- Usage of arrays"

    Relevant Pages

    • Re: Whats your favourite FLOSS?
      ... I can't say Bash is my favourite shell because it's the default, ... as I do Linux, GCC, Xorg, and GLibC. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Souring in a file
      ... In bash, but not ksh, you can export ... functions so that child processes will see them: ... deprecated and removed in [most ports of] ksh93 in favor of ...
      (comp.unix.shell)
    • Re: filename problem
      ... On Tue, 2004-07-27 at 14:35, Thomas Meggs wrote: ... Are you using BASH? ... Stronger, better, faster: Linux ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org ...
      (Debian-User)
    • Re: [: -le: argument expected
      ... If you've ever seen an sh script, you'll see a lot of this: ... Note the difference if [or test is used within bash: ... that the error is coming from something within the ports framework, ... And being as I have dealt with similar autoconf warnings in ...
      (freebsd-stable)
    • Re: libreadline.so.5 not found
      ... Larry wrote: ... > I just upgraded to 4.11-STABLE and upgraded a lot of ports after that. ... Consider reinstallation of bash. ... To unsubscribe, ...
      (freebsd-questions)