Re: Bash scripting -- Usage of arrays

From: Jayesh Jayan (jayesh.freebsdlist_at_gmail.com)
Date: 11/29/05

  • Next message: John Baldwin: "Re: Bash scripting -- Usage of arrays"
    Date: Wed, 30 Nov 2005 03:48:40 +0530
    To: John-Mark Gurney <gurney_j@resnet.uoregon.edu>, Jayesh Jayan <jayesh.freebsdlist@gmail.com>, freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org
    
    

    Hi John,

    yes it works when executed with bash aa.sh.

    Thank you :)

    On 11/30/05, John-Mark Gurney <gurney_j@resnet.uoregon.edu> wrote:
    >
    > 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."
    >

    --
    Jayesh Jayan
    "The box said "Requires Windows 95, NT, or better", so I installed Linux."
    Visit my homepage @ http://www.jayeshjayan.com
    _______________________________________________
    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: John Baldwin: "Re: Bash scripting -- Usage of arrays"

    Relevant Pages

    • Re: Environmental Variables
      ... >>shell has been ported to DOS and/or Windows). ... bash running as a shell in an Xterm ... It's part of a collection of Unix utilities ported to DOS that I ...
      (comp.os.msdos.programmer)
    • Re: top 5 reasons that posts arent made from OpenSuSE/Linux
      ... Sometimes it is extremely frustrating to do things, ... would be so much easier to use bash. ... "trick" I use is to first pick soft colour for the cells. ... Nothing native like bash on Windows to do simple tasks, ...
      (alt.os.linux.suse)
    • Re: How to properly set COLUMNS
      ... > so that the text wraps nicely no mater what size the windows has, ... > I'm having some problems setting the COLUMNS variable. ... > these variables are not exported in the shell script, ... > After a little digging I found out that bash sets COLUMNS if it receives ...
      (comp.unix.shell)
    • Re: Ruby wildcard command line argument auto expansion
      ... I am using Windows XP "cmd" shell. ... bash or C-shell. ... rab:rab/tmp $ echo *.java ...
      (comp.lang.ruby)
    • Re: Linux teurer als Windows?
      ... alltäglichen Desktopanwendungen, sondern bei Programmen, die es so ... unter Windows nicht gibt, z.B. die bash Shell. ... Die Bash gibt es auch fuer Windows. ...
      (de.comp.os.unix.linux.misc)