- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: conversion from small to CAPS lets.
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
Forums
Discussions
Discussions
Forums
Discussions
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
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
12-19-2001 05:36 AM
12-19-2001 05:36 AM
conversion from small to CAPS lets.
Wann to know how to covert string of "small letters" into CAPS one.
Please reply asap.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 05:42 AM
12-19-2001 05:42 AM
Re: conversion from small to CAPS lets.
echo "string"| dd conv=ucase
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 05:52 AM
12-19-2001 05:52 AM
Re: conversion from small to CAPS lets.
Use tr. From man tr:
Translate all lower case characters in file1 to upper case and write the result to standard output.
tr "[:lower:]" "[:upper:]"
Or: echo string | tr "[:lower:]" "[:upper:]"
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 05:52 AM
12-19-2001 05:52 AM
Re: conversion from small to CAPS lets.
echo "string"| tr "[:lower:]" "[:upper:]"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 05:54 AM
12-19-2001 05:54 AM
Re: conversion from small to CAPS lets.
string="test"
echo $string
TEST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 05:55 AM
12-19-2001 05:55 AM
Re: conversion from small to CAPS lets.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:00 AM
12-19-2001 06:00 AM
Re: conversion from small to CAPS lets.
The answers are quite satisfactory but what if I wann to retain the file extensions as it is...I mean for "abc.sql", it should be "ABC.sql" convention.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:03 AM
12-19-2001 06:03 AM
Re: conversion from small to CAPS lets.
If you only have a "single" dot, then
echo abc.def | awk -F. '{print toupper($1)"."$2}'
ABC.def
should be OK.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:05 AM
12-19-2001 06:05 AM
Re: conversion from small to CAPS lets.
NAME=`echo $STRING | awk -F. '{print $1}'
EXT=`echo $STRING | awk -F. '{print $2}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:23 AM
12-19-2001 06:23 AM
Re: conversion from small to CAPS lets.
for i in `ls *\.*`
do
cnt=`echo $i | awk -F. '{print NF}'`
if [ ${cnt} -eq 2 ]
then
echo $i | awk -F. '{print toupper($1)"."$2}'
fi
done
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:33 AM
12-19-2001 06:33 AM
Re: conversion from small to CAPS lets.
for i in `ls *\.*`
do
echo $i | awk -F. '{if (NF == 2) print toupper($1)"."$2}'
done
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:43 AM
12-19-2001 06:43 AM
Re: conversion from small to CAPS lets.
sed filename 'y/abc...xyz/ABC...xyz/'
fill in the ... part with then entire alphabet. Of course this is not the pretty way to do things, but it is the sed way.
Enjoy,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:50 AM
12-19-2001 06:50 AM
Re: conversion from small to CAPS lets.
ls -1 abc.sql | awk -F "." '{system("mv" ""$0 "" toupper($1) ".sql" }'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2001 06:50 AM
12-19-2001 06:50 AM
Re: conversion from small to CAPS lets.
ls -1 abc.sql | awk -F "." '{system("mv" " " $0 " " toupper($1) ".sql" }'