Created attachment 1755516 [details] simple shell script using tr, head, and echo. Description of problem: Running simple script fails under ksh, but succeeds under bash. Version-Release number of selected component (if applicable):ksh-2020.0.0-4.fc33 How reproducible: Always Steps to Reproduce: 1. Save attached script as "foo": 2. Run it using bash: sh ./foo 3. Run it using ksh: ksh ./foo Actual results: With bash: 81> sh foo ZR*33pQoES4P1fJLGz$F 82> With ksh: 84> ksh foo tr: ][=*: equivalence class operand must be a single character 85> Expected results: Both shells should run script successfully. Additional info:
You need to write: tr -dc '...' ... instead of: tr -dc "'...'"