bash scripts broken in ELF slackware

bash scripts broken in ELF slackware

Post by zachary bro » Sat, 18 Nov 1995 04:00:00



Not being a bash whiz to begin with, I was very upset to find that the
scripts I finally got working, no longer work under the latest edition
of slackware. It seems that bash itself is different. The 'getopt'
command doesn't exist anymore, I had to change to 'getopts', but even
that doesn't work. Is there some diff-file comparing the old bash and
the new bash?

Zack

 
 
 

bash scripts broken in ELF slackware

Post by bill davids » Wed, 22 Nov 1995 04:00:00



| Not being a bash whiz to begin with, I was very upset to find that the
| scripts I finally got working, no longer work under the latest edition
| of slackware. It seems that bash itself is different. The 'getopt'
| command doesn't exist anymore, I had to change to 'getopts', but even
| that doesn't work. Is there some diff-file comparing the old bash and
| the new bash?

A) there never was a getopt command in bash (see below)
B) getopts is not the same, you have to change the script
C) the new Slackware should have included getopt, major omission
   but it's not part of bash and never was.

NB:
  davidsen> type getopt getopts
  getopt is /usr/bin/getopt
  getopts is a shell builtin
  davidsen>
--

  "Understand your problem, it's easier to solve that way!" -me

 
 
 

bash scripts broken in ELF slackware

Post by Patrick J. Volkerdi » Thu, 23 Nov 1995 04:00:00




: | Not being a bash whiz to begin with, I was very upset to find that the
: | scripts I finally got working, no longer work under the latest edition
: | of slackware. It seems that bash itself is different. The 'getopt'
: | command doesn't exist anymore, I had to change to 'getopts', but even
: | that doesn't work. Is there some diff-file comparing the old bash and
: | the new bash?

: A) there never was a getopt command in bash (see below)
: B) getopts is not the same, you have to change the script
: C) the new Slackware should have included getopt, major omission
:    but it's not part of bash and never was.

Actually in regard to C), the name of the binary is "getoptprog".  That's
the name that was given to it in the version of util-linux used in Slackware
3.0.  I think it used to be called getopt in previous releases of util-linux
and I'm not sure why the name changed.

So... changes your script to use getoptprog, or make a link getopt ->
getoptprog and everything should work fine.

Pat

 
 
 

bash scripts broken in ELF slackware

Post by Andries Brouw » Fri, 24 Nov 1995 04:00:00



: : A) there never was a getopt command in bash (see below)
: : B) getopts is not the same, you have to change the script
: : C) the new Slackware should have included getopt, major omission
: :    but it's not part of bash and never was.

: Actually in regard to C), the name of the binary is "getoptprog".  That's
: the name that was given to it in the version of util-linux used in Slackware
: 3.0.  I think it used to be called getopt in previous releases of util-linux
: and I'm not sure why the name changed.

I don't think the name changed - it has always been getopt, and still is.
But in some internal source directory it is getoptprog, while the
Makefile has:
...
install: all
        $(INSTALLDIR) $(BINDIR) $(USRBINDIR)
        $(INSTALLBIN) $(BIN) $(BINDIR)
        $(INSTALLBIN) $(USRBIN) $(USRBINDIR)
        $(INSTALLBIN) getoptprog $(USRBINDIR)/getopt
        (cd $(BINDIR); ln -sf hostname dnsdomainname)
        $(INSTALLDIR) $(MAN1DIR) $(MAN8DIR)
        $(INSTALLMAN) $(MAN1) $(MAN1DIR)
        $(INSTALLMAN) getoptprog.1 $(MAN1DIR)/getopt.1
...

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. JDK-1.0.2 on FreeBSD-2.1.0

3. Slackware kernel with ELF, then remove elf, won't boot.

4. afterstep .profile

5. script breaks: how compatible bash is with sh/ksh

6. NIS Problem on SCO Open Server 5.0.0

7. modelines and Xfree 4 stuff

8. ssh/scp bash script broken in crontab.

9. **** Info about Computer Break ins and Hacking ****

10. Computer Break ins and Hacking Info?

11. How to make a bootimage disk, like the bootdsks.144 ins slackware.

12. Bash/CGI - - HTML call to Bash script