Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

"\" is stripped off from environment variables when pass from Windows to Unix

The first couple of steps are executed in Windows server, the environment variable outputs as this:
	
	
	
FILE=M:\c999752_QRF_DEV\Informatica_QVOB\QRF_infa\xml\map\m_HUB_LT_RF_APPLICATION.xml
	
	
	
But in the next step when it's excuted in Unix, the environment variable becomes like this:
114 10/19/12 12:01PM ENV FILE=M:c999752_QRF_DEVInformatica_QVOBQRF_infaxmlmapm_HUB_LT_RF_APPLICATION.xml

How can I fix this?

This is the step running in Unix server:

echo "Start import/export to/from Informatica ${TARGET_ENV} environment"
/usr/bin/perl bldInfa.pl ${APP_NAME} ${TARGET_ENV} ${COMMAND} ${FILE}

I create these environment variables in BF, and set it from ClearCase (server on Windows) trigger script as below:

   my $buildEnvEntryName = "FILE";
   my $buildEnvEntryToUpdate = BuildForge::Services::DBO::BuildEnvironment->findByUuid($conn, $buildEnvUuid)->getEntry($buildEnvEntryName);
   if(!defined($buildEnvEntryToUpdate)) {
       print "BuildEnvironmentEntry <".$buildEnvEntryName."> could not be found.\n";
       return 1;
   }
   $build->updateBuildEnvEntryValue($buildEnvEntryToUpdate->getUuid(), $file);


Thanks
Jirong

0 votes



2 answers

Permanent link
 There are two ways I have seen to fix this, either double the slashes "\\" or instead of using a slash use a variable e.g. ${FILE_SEP} and set it on the Unix server to a "/" and on the Windows server a "\".

1 vote


Permanent link
 I resolved this issue by replacing "\" to "/" when pass on environment variables from Windows to Unix. Now I am hitting the same issue when I try to do a ".runwait "Informatica-PRD". In the launched project "Informatica-PRD", again the "/" is lost, even I make it "//", it still lost and becomes like this: 
FILE=M:c999752_ABC_DEVInformatica_AVOBABC_infadummyQEM.txt
	



0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 19 '12, 12:25 p.m.

Question was seen: 4,750 times

Last updated: Oct 25 '12, 5:17 p.m.

Confirmation Cancel Confirm