Buildforge: step can not be safed when using special characters
The following pretty simple step can not be safed:
Also, masking the special characters with a backslash (\) is not helping. I'm using bfproject 7.1.2.0-0-0341. Any ideas? Christian |
3 answers
I'm not exactly sure what you are doing or what you are seeing, but for variable expansion problems remember that the command will be parsed TWICE. Build Forge will take a pass at variable expansion and will attempt to expand variables for its own environment, and then the shell will take a variable expansion pass. If the shell starts another shell it will possibly take more variable expansion passes. To bypass the BF variable expansion try _NO_PREPARSE_COMMAND in the step. Otherwise double up any variable characters.
|
Hi Spencer, thanks for your quick response. Actually, all I want to do is call a Linux command (ls -asl) and modify the output by using awk. The command on my host system will show the following:
[root@jabulan-lp4 ~]# ls -asl | awk '{ print $5 }' root root root root root root root root users When trying to put this Linux command into the buildforge step, I can not save the step... It seems to be related to the awk part because the simple "ls -asl" is working. I'm trying to mask the '{ print $5 }'- expression like \'{ print $5 }\' but this is not helping... Comments
Spencer Murata
commented Dec 11 '12, 10:51 a.m.
| edited Dec 11 '12, 10:51 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Ok the answer then is the same. The problem is the $5 will be interpreted to 5 by BF, so either use the preparse on the step or double up the $ character.
ls -asl | awk '{ print $$5 }'
|
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.