Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Get Started Guide
Join the world’s largest interactive community dedicated to Oracle technologies.
Learn from thousands of community experts
Get answers to your technical questions
Share your knowledge with peers
Please enter a title.
You can not post a blank message. Please type your message and try again.
Oracle Community (OTN)
Server & Storage Systems Archived Forums
Solaris Archived Forums
This discussion is archived
on Feb 1, 2007 7:33 AM by 807567
Batch Script Migration
Feb 1, 2007 7:33 AM
I need to convert a batch script from win 2003 to a shell script for solaris.
We have some directories on ther server where files get placed from an external source. These get placed according to the souce in different dirs
so for instance
What i want o know to how to write a script that will move the files placed in those directories, to another location say
Moving is fine but we need to rename the files as follows:
Say the file came in as
Needs to be renamed as follows
Obviously where dir1 is the source directory it came from. We had this working on windows but because of migration need to update.
Also needs to be dynamic as possible, as directories can be removed and added.
A backup of the file in a sperate directory would be nice as well.
What i was thinking was to ls the /extsource dir and output a file and then use that file in a for loop to poll each dir for files and then rename and move, but dont know all the syntax as yet.
Thanks for any input
This content has been marked as final.
Show 0 replies