use of unquoted character classes for tr

Bug #831194 reported by Mike
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
origami (Ubuntu)
New
Undecided
Unassigned

Bug Description

This script uses the construct: tr [A-Z] [a-z]
However, it should instead use: tr '[A-Z]' '[a-z]'
In the second case, the character classes (square brackets and everything inside them) will be passed as arguments to tr. With the first case, the shell will first try to find a file which matches the expression all files named with a single character in the set [A-Za-z], and will then either pass these file names as arguments, or if they do not exist, will pass (the intended) literal string for the character classes.

How to test: Create a file named "a", in the current directory, then try to run the script.

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.