- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Change lower case
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:20 AM
тАО03-22-2005 02:20 AM
The entire file is lower case and I want it to be upper case.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:23 AM
тАО03-22-2005 02:23 AM
Re: Change lower case
Do a man on tr.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:26 AM
тАО03-22-2005 02:26 AM
Re: Change lower case
tr "[:lower:]" "[:upper:]"
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:26 AM
тАО03-22-2005 02:26 AM
Re: Change lower case
# awk '{print toupper($0)}' filename > filename.new
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:47 AM
тАО03-22-2005 02:47 AM
Re: Change lower case
I believe your [:upper] and [:lower] are the wrong way round ;-)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:54 AM
тАО03-22-2005 02:54 AM
Re: Change lower case
Thanks for posting this question. I've just learned the easy way of doing this. I've not needed to do an entire file before, just certain sections within a file. I've done this manually by putting my cursor over the first letter to change to uppercase (or this works also for lowercase) and holding the shift key down and pressing the ~ (tilde) key. Holding these keys down changes the case from lower to upper or upper to lower (depending on the current case) until I release the keys.
Again, thanks for posting your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 02:59 AM
тАО03-22-2005 02:59 AM
Re: Change lower case
I couldn't get this to work:
# cat file | tr 'a-z' 'A-Z'
but I could get this to work:
# cat file | tr -s '[:lower:]' '[:upper:]'
Again, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 03:02 AM
тАО03-22-2005 03:02 AM
Re: Change lower case
Sorry, forgot the complete syntax for converting a file from lowercase to uppercase ...
# cat | tr -s '[:lower:]' '[:upper:]' >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 06:18 AM
тАО03-22-2005 06:18 AM
Re: Change lower case
--- File toupper.c ----
#include
#include
int main ()
{
for (;!feof(stdin);)
fputc (toupper(fgetc (stdin)), stdout);
return 0;
}
---- End ---
Save above file in toupper.c and compile.
# cc toupper.c -o toupper
Execute it as:
# cat you_file | toupper
- Biswajit