hi all
i have 3 conditions numbered 1,2 and 3
1 = standard path
2= alternate path
3= prohibited path
and i have the following environments
CFG,GDV,GQA,GPR,STG & STJ and i'm writing a script to move files from one environment to another,given the source env,destination server,dest env there are conditions set up
example : CFG|destination server|destination env|3
that is you cannot move file from the same env to same env,so the condition in the above line displays 3
please need help with this,as it is urgent,any idea appreciated
Bkan77,
I do not fully understand your requirement.
Could you please write all relevant information, including source control
files and expected output?
Hi shelllife
as i wrote earlier i have the following environments:CFG,GDV,GQA,GPR,STG&STJ the script we have now does pulling like example if i need to migrate a file from CFG-GDV i need to logon to the GDV server and pull the file from the CFG,but now i have a set of conditions like whatever server i'm logged onto,i should migrate the file to another environment,but still i have some conditions like for example if i'm on the CFG server(environment)
CFG|DESTINATION SERVER NAME|DESTINATION ENV(CFG)|3
CFG|DESTINATION ENVIRONMENT|GDV|1
Hi shelllife
as i wrote earlier i have the following environments:CFG,GDV,GQA,GPR,STG&STJ the script we have now does pulling like example if i need to migrate a file from CFG-GDV i need to logon to the GDV server and pull the file from the CFG,but now i have a set of conditions like whatever server i'm logged onto,i should migrate the file to another environment,but still i have some conditions like for example if i'm on the CFG server(environment)
CFG|DESTINATION SERVER NAME|DESTINATION ENV(CFG)|3
CFG|DESTINATION ENVIRONMENT|GDV|1
CFG|DESTINATION ENVIRONMENT|DESTINATIONENV(GQA)|3
CFG|DESTINATION ENVIRONMENT|DESTINATIONENV(STG)|3
CFG|DESTINATION ENVIRONMENT|DESTINATIONENV(STJ)|1
CFG|DESTINATION ENVIRONMENT|DESTINATIONENV(GBP)|2
CFG|DESTINATION ENVIRONMENT|DESTINATIONENV(GPR)|3
and the numbers 1,2,3 represent the conditions
1= standard path
2= alternate path
3=prohibited path
any help or idea is appreciated and its urgent
thanks
bkan77
If you want to retrieve the condition based on the destination:
mDest='GPR'
mCond=`egrep ${mDest} input_file | sed 's/.*|//'`
if [ "$mCond" = "3" ]; then
echo "Transfer not permitted"
else
echo "Transfer permitted"
fi
hi shell life
thanks for the answer
but what i'm looking at is a general script that works for all envs,not only CFG,i want for all the 7 envs,wht if the source is STJ,STG,GPR,GDV,GQA and all these properties are stored in a particular property file and they are mounted on all servers, i hope i explained in detail,pls lemme knw if you didnt quiet understand
and i appreciate your help very much
thnks
bkan77
Hi Johnson
as i mentioned above,i have 7 environments,i need to write a script which will move a file frm any env to any env,but they have a few constraints,which are listed in a seperate property file, for example:
if i'm on the CFG server and i want to move a file to GPR environment,according to the conditions listed in the property file i cannot,it will display the conditiobn 3=prohibited path,so i need a generalised script for all the environmnets which identifies the host and reads the property file and based on the conditions displays the message
example:
1= standard path
2=alternate path
3=prohibited path
pls need help on this urgently