"\" 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
|
2 answers
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 "\".
|
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 |
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.