getopts doesn't work in Ubuntu 9.10

Bug #511706 reported by blaze_o_glory
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
abcde (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: yelp

This code does not produce any output:

#!/bin/bash

# submit like so: bash getopts.sh -b -c george
# or like so: bash getopts.sh -bc george

#an option followed by a colon requires an argument:
while getopts abc:def opt; do
  echo opt= $opt and OPTARG= $OPTARG
done

ProblemType: Bug
Architecture: amd64
Date: Sat Jan 23 16:23:22 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/yelp
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: yelp 2.28.0-0ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: yelp
Uname: Linux 2.6.31-17-generic x86_64

Revision history for this message
blaze_o_glory (dan-blanchette) wrote :
Revision history for this message
WeatherGod (ben-v-root) wrote :

blaze_o_glory, thank you for taking the time to report this issue. I tried your script and it works fine for me. I can not reproduce your stated behavior. Have you done any sort of customization of your user profile?

tags: added: needs-reassignment verification-needed
Changed in yelp (Ubuntu):
status: New → Incomplete
Revision history for this message
blaze_o_glory (dan-blanchette) wrote :

Well, that script does work for me. I must have tested it without specifying options.

What started this for me is the CD ripping software abcde does not work
because the while loop that calls getopts does not process the options.

Does this do the normalization for you?
 $ abcde -b -o mp3

Revision history for this message
Pedro Villavicencio (pedro) wrote :

that's not a yelp issue.

affects: yelp (Ubuntu) → ubuntu
Revision history for this message
WeatherGod (ben-v-root) wrote :

Unfortunately, I have a netbook, so I can not test the command properly (since abcde can not detect a cd rom drive).

Changed in ubuntu:
status: Incomplete → New
Revision history for this message
WeatherGod (ben-v-root) wrote :

Moving this report over to the abcde package since it seems that the OR might be experiencing an issue with command-line parsing in abcde

affects: ubuntu → abcde (Ubuntu)
Revision history for this message
blaze_o_glory (dan-blanchette) wrote :

I figured out why I wasn't able to get abcde to process options. I was
submitting like so:

 abcde /media/cdrom -b -o mp3:"-b 256"

without specifying the -d option like this:

 abcde -d /media/cdrom -b -o mp3:"-b 256"

Unfortunately, there was no error message.

But I found out that that simply specifying -b does not run the normalization
process. I found that specifying "normalize" in the actions does make it work:

  abcde -a cddb,read,encode,tag,move,clean,normalize -b -o mp3:"-b 256"

Hopefully, this will benefit someone out there on the internet.

Revision history for this message
WeatherGod (ben-v-root) wrote :

ok, now marking this as invalid. Thank you very much for reporting what you learned. Please feel free to continue helping to make Ubuntu better by reporting any future issues you encounter.

Changed in abcde (Ubuntu):
status: New → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.