[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19654: tr command odd behavior on Linux Platform
From: |
Kousik Mandal |
Subject: |
bug#19654: tr command odd behavior on Linux Platform |
Date: |
Thu, 22 Jan 2015 15:22:42 +0530 |
Hi Team,
I am observing an unexpected behavior with tr command. In a directory if there exist one file named a and executing following tr command.
---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---
It gives Output: aello aorld
Where as if there exist another file/directory named b then the same command it failing with below error
---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---
Output:
tr: extra operand `b'
Try `tr --help' for more information.
If only file b is present then the same command is not failing but it give wrong output.
---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---
Output:
Hello World
Same type of observation found if only a single alphabetic name file or directory is exist.
Can you please update me it is a bug or expected behavior?
Thanks,
Kousik
- bug#19654: tr command odd behavior on Linux Platform,
Kousik Mandal <=