Re: Activating the Shift-lock key via shell



Antonio Maschio <NOtbinSPAM@xxxxxxxxxxxxxxx> writes:

Luuk ha wrote:
you can also pipe your input/output through:
$ tr "[:lower:]" "[:upper:]"
echo "Thanks in advance" | tr "[:lower:]" "[:upper:]"

No. I knew this. I don't want to filter output, but input.

Suppose I want to type all in caps.

No offence, but why would you EVER want to do that?
The days of upper-case only terminals are long gone.

All upper case is very hard to read by humans. And if a program wants
it, then why not modify yout script to make it easier for humans, and
have the script adapt it for your program?

Note that you can use tr(1) to filter input as well (See OldSchool's Posting)
Read a line
Convert to lower case.

You can even make a special parser that looks for a character, like "^"
and converts the rest of the word (or line) to upper case.

So that when you type
example of ^upper ^case and lower case
it's the same as typing
example of UPPER CASE and loser case
Or you can use a seperate character for downcase ("|")
example of ^upper case| and lower case

Alternately, you can use stty.

stty olcuc
will convert all input to upper case.
stty -olcuc
will turn it off.

But you have to tell the program when to do this.

.