Is this valid in shell programming?
tr 'a-z' 'A-Z' < filename>filename
note: The filename refers to the same file.

tr -s '[:lower:]'  '[:upper:]'  < filename > newfilename

You have to use POSIX character classes, not "regex" classes.
this: < filename > filename : causes filename to be truncated to zero length BEFORE tr runs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.