Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Server & Storage Systems Archived Forums
Solaris Archived Forums
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Feb 1, 2007 1:33 AM by
Batch Script Migration
Feb 1, 2007 1: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