HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Share with you: a simple script
Operating System - HP-UX
1833569
Members
4436
Online
110061
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-10-2001 11:56 PM
09-10-2001 11:56 PM
Name: up2low
Function: Move all the filenames/dirnames under the
input directories, from
upper case to lower case
Usage: itmv
E.g. up2low DIR_NAME1 DIR_NAME2
Content:
#!/sbin/sh
for i in `find $* \( -type f -o -type d \) | sort -r`
do
mv ${i} "`dirname ${i}`/""`basename ${i}|tr '[A-Z]' '[a-z]'`"
done
Hope it can help you!
/Listener
Function: Move all the filenames/dirnames under the
input directories, from
upper case to lower case
Usage: itmv
E.g. up2low DIR_NAME1 DIR_NAME2
Content:
#!/sbin/sh
for i in `find $* \( -type f -o -type d \) | sort -r`
do
mv ${i} "`dirname ${i}`/""`basename ${i}|tr '[A-Z]' '[a-z]'`"
done
Hope it can help you!
/Listener
Listen, then discover, then succeed!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 02:26 AM
09-11-2001 02:26 AM
Re: Share with you: a simple script
Thanks,
I'll put that one in my blue book!
Tim
I'll put that one in my blue book!
Tim
-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 02:54 AM
09-11-2001 02:54 AM
Solution
Hello "discoverer",
I would recommend to first test for the existence of
the "new" (uppercase) file in the target directory, as
you may create the same upper case name from more
than one mixed case names, e.g.:
source-dir:
aFile Afile AFile aFiLe
target-dir:
AFILE
You see the danger?
Just my ?0.02,
Wodisch
PS: Did we not have a thread about that?
I would recommend to first test for the existence of
the "new" (uppercase) file in the target directory, as
you may create the same upper case name from more
than one mixed case names, e.g.:
source-dir:
aFile Afile AFile aFiLe
target-dir:
AFILE
You see the danger?
Just my ?0.02,
Wodisch
PS: Did we not have a thread about that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2001 12:50 AM
09-12-2001 12:50 AM
Re: Share with you: a simple script
Hi Wodisch,
You are really a sharp 'wizard'!
So, there should be an additional check on the target filename before 'mv', then if confilict, we should report these files, then abort or 'mv' it to a new name, depending on our conditions.
For my users' requirements, there is no such a risk.
Thanks for your attention!
/Listener
You are really a sharp 'wizard'!
So, there should be an additional check on the target filename before 'mv', then if confilict, we should report these files, then abort or 'mv' it to a new name, depending on our conditions.
For my users' requirements, there is no such a risk.
Thanks for your attention!
/Listener
Listen, then discover, then succeed!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP