On Thursday 16 July 2020 4:54:09 AM IST davidson wrote:
> And so you have set up known environmental conditions for subsequent > tests of that mechanism. Yes, that was my intention > which permits me to toggle my keyboard layout between two alternatives > ("us" and "ru") by striking capslock. I will do something similar once I get my keyboard layout working properly. > So I am prone to conclude that whatever your layout may have been > prior to step (1), it was not a dual-layout setup. > (This relates more to my own curiosity than to your primary concern.) No it is not. As of now, I am manually loading my Malayalam layout using setxkbmap > And though it does not have to do with the test you are conducting > here, I do remain curious about whether your day-to-day keymap table > *does* include such mappings. It is entirely possible that it does. > > I imagine at this point you may be able to work this out for yourself, > if it interests you. I checked and did not find the character. > It is cool you experiment with what you don't understand. That is how > mistakes are made, and mistakes are the best teacher of all. That is true > This is probably a good spot to recommend a coherent and > comprehensive, well-curated beginner's guide to bash: > > BashGuide - Greg's Wiki > http://mywiki.wooledge.org/BashGuide > > It is a shame if good learning resources are not used. Will go through > > 6) The command grep "W" .XCompose | tr $'\xc2\xa0' \! returns > > grep "W" .XCompose | tr $'\xc2\xa0' \! > > This does not seem to make any sense. Where is the output? Sorry for the mistake. The output is <W> : "This replaces W" > It looks to me like you may have pasted a copy of the command, where > you meant to paste its output. Yes, that was the mistake. > What you seem to be *showing* us, is that the command produced as > output a copy of itself. But you don't seem to be *saying* this, or > reasoning as if that were so, since whatever the output was, further > below you seem inclined to think that it indicated the file contained > no nonbreaking spaces. Yes, that was my conclusion. > $ sed 'y/\xc2\xa0/%/' somefile An off topic question: of sed, awk and perl, if I am to chose one to learn, which would you suggest. I wanted to do some substitutions. I read about them and decided on PERL because from what I understood, it has better support for regular expressions and do almost everything that sed and awk could do. Have I made the right decision? > (However, one advantage of using the C-style byte-constants (\xHH) > instead is that it is easy for everyone to see what they are, the web > archive won't replace them with normal spaces, etc.) Using the Unicode sequence also gives the same advantages, doesn't it? I find it difficult to get the "translation" between the unicode code values and the hexadecimal/octal representation. > David Wright I believe explained this one already. But I do agree with > you that Original Petitioner would be much funnier. Funny it is. To me, poster was (until a few emails back) a paper with something written in it and stuck on wall . > OP, on the other hand, always conveys meaning in this sort of forum. Sure, it does. > But OP, wHaT WoUlD tHe CoMmUnItY tHiNk about your keyboard layout? > > Have you petitioned your local Keyboard Zoning Board for a custom > keymap easement and filed the necessary declarations? With your sense of humor, I am unsure of the meaning of the weird casing of your sentence. On a serious note, I am unaware of anything like a local Keyboard Zoning Board for Kerala / India. Even if one is there, I will tackle it later. Anyway, there is no need for any formalities for customising my computer. > I do not know whether you are familiar with what are called "Regular > Expressions", often abbreviated as regex. Yes, I know a bit about regex though not an expert. And I had read about sed earlier, but haven't used it favouring perl. > %% B. Any command (grep included) gets its arguments from the shell .... > BashGuide/SpecialCharacters - Greg's Wiki > http://mywiki.wooledge.org/BashGuide/SpecialCharacters This isn't something that I was familiar with. Will read. > [end of overly looong exposition] Thanks for taking the time and the effort to explain