- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lower case/upper case question
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
Discussions
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
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
09-02-2002 05:59 AM
09-02-2002 05:59 AM
I've the following question.
I write a shell script that copy a list of file from one directory to another.
This files came from a Windows system and when I transfer them from Windows to UNIX the name of the files are in the lower case.
I need to copy these file to another directory in upper case. For example:
in /home/luca/app/ I've the following file : abcde.txt.
I need to copy this file in the directory /home/luca2/final like ABCDE.txt.
Is there a function to help me?
Does anybody have avy suggestion? Any idea?
Thanks in advance for your help and your support.
Regards.
Luca
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 06:05 AM
09-02-2002 06:05 AM
Re: lower case/upper case question
Standard shell typeset. see man sh-posix
-u Convert all lowercase characters to uppercase characters.
The lowercase -l option is turned off. Flagged as
uppercase.
typeset -u lala=lala
echo $lala
LALA
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 06:16 AM
09-02-2002 06:16 AM
Re: lower case/upper case question
One method for copy files to new directory,translating lower to upper in filename but keep lower in extension.
file=/home/luca/app/abcde.txt
cp $file /home/luca2/final/`basename $file .txt | tr '[:upper:]' '[:lower:]'`.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 06:30 AM
09-02-2002 06:30 AM
Re: lower case/upper case question
If you really want to then you need something like this:
cd /home/luca/app;find . -type f | awk '{loname=$1; upname=toupper($1); doit="mv
" loname " /home/luca2/final/" upname; system(doit);}'
live free or die
harry