Wednesday, December 4, 2013

Toggle case of alphabets in /vi/ and console

tr 'a-z' 'A-Z' < contacts.txt

Case of letters in the file contacts.txt can be changed from lower to upper using the console command above. In vi the same can be achieved by switching to command mode and typing the tilde key on the letter of choice. For bulk edits visualization mode (Ctrl+v) works well. More information about this can be found at: http://vim.wikia.com/wiki/Switching_case_of_characters