LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   keyboard shortcut for changing the shorcut (https://www.linuxquestions.org/questions/linux-newbie-8/keyboard-shortcut-for-changing-the-shorcut-917393/)

texasj 12-06-2011 08:40 AM

keyboard shortcut for changing the shorcut
 
Hi everybody...!
I am using Red Hat Enterprise Linux Server release 5.4 (Tikanga) I eagerly want to know whether there is any keyboard shortcut for changing the case of command while typing command on the command line.
For example: I want to modify the the file 'DEMO.txt'
but I wrongly typed 'demo.txt'
$ vi demo.txt
So how can I change demo.txt to DEMO.txt using keyboard on same line without clearing the existing command.
I have searched a lot for this but didn't get any solution..:-(

Hope some one will have solution for this..!

raju.mopidevi 12-06-2011 09:19 AM

Shortcuts will be dependent on terminals. Which terminal you are using ? Are you working on linux directly or connecting through a terminal (like putty/telnet) from windows ?

texasj 12-08-2011 02:54 AM

Thanks Raju for the reply..!
I am using putty as well as working on linux terminal directly.

asimba 12-08-2011 03:19 AM

Code:

set -o vi
1.type command / navigate to required command

2.press escape to change to vi command mode

3.pressing ~ will change case of given

deep27ak 12-08-2011 06:44 AM

Quote:

Originally Posted by texasj (Post 4543445)
Hi everybody...!
I am using Red Hat Enterprise Linux Server release 5.4 (Tikanga) I eagerly want to know whether there is any keyboard shortcut for changing the case of command while typing command on the command line.

if you want to change the case or any other thing related to commands then you need to use

Code:

#alias LS='ls -l'
this one is temporary but for permanent changes

Code:

#vi /root/.bashrc
(make an entry)
alias LS='ls -l'

Quote:

Originally Posted by texasj (Post 4543445)
For example: I want to modify the the file 'DEMO.txt'
but I wrongly typed 'demo.txt'

This doesn't seems command if you are talking about renaming file name then

Code:

#mv demo.txt DEMO.txt
Quote:

Originally Posted by texasj (Post 4543445)
$ vi demo.txt
So how can I change demo.txt to DEMO.txt using keyboard on same line without clearing the existing command.

If you are talking about changing case inside vi editor then the place for you is

Code:

#man vi

asimba 12-08-2011 06:52 AM

@deep27ak - You might want to read Original post again

deep27ak 12-08-2011 06:57 AM

Quote:

Originally Posted by asimba (Post 4545088)
@deep27ak - You might want to read Original post again

I would be really glad if you clarify me because as per my last post I replied to every line of OP

changing the case in what sense??
Code:

using CAPS LOCK?

using mv command(to rename a file?)


texasj 12-09-2011 01:16 AM

Well thanks Asimba & Deep27ak for the reply...
The issue is still not resolved....!
Using vi, mv we can change the case but the question was to use keyboard shortcut while typing the command & changing the case of typed word on that same line & of course without using 'caps lock'.
Is there any shortcut you guise know for this?

e.g: if I press shift + ~ character it will change the case of the word in vi editor mode for that you have to be in the vi editor, and I want same functionality for changing the case of the words on command line itself..?

And please accept my regrets if I was unable to put my question in right manner...!

asimba 12-09-2011 01:33 AM

Quote:

Originally Posted by texasj (Post 4545686)
Well thanks Asimba & Deep27ak for the reply...
The issue is still not resolved....!
Using vi, mv we can change the case but the question was to use keyboard shortcut while typing the command & changing the case of typed word on that same line & of course without using 'caps lock'.
Is there any shortcut you guise know for this?

e.g: if I press shift + ~ character it will change the case of the word in vi editor mode for that you have to be in the vi editor, and I want same functionality for changing the case of the words on command line itself..?

And please accept my regrets if I was unable to put my question in right manner...!

You might want to read my earlier post again :)

I will repost that - you need to follow instructions thats all

Type following command at prompt
Code:

set -o vi
Next

1.type command / navigate to required command

2.press "escape" to change to vi command mode

3.pressing ~ will change case of given


You need not run vi editor at all.

texasj 12-11-2011 09:01 AM

solved
 
Great...! you done it..!
Your solution works, it solved my problem...!


THaaaaaaaaaaaaaaaaanKKKKKKKKKsssssSSSSSSSS....!

asimba 12-11-2011 11:36 AM

I am glad I could help you!

raju.mopidevi 12-11-2011 07:26 PM

Quote:

Originally Posted by texasj (Post 4547168)
Great...! you done it..!
Your solution works, it solved my problem...!

Good ! now go to thread tools -> make it as SOLVED.

texasj 12-17-2011 09:10 AM

thanks for update
 
Hello raju.mopidevi
Thanks for updating me.. (threads tools ) I was unaware of this..!


All times are GMT -5. The time now is 11:47 AM.