History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-1854
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Bae JaeHyun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

At Shell/Batch Command step, linux shell script cannot substitute a array variable

Created: 22/Nov/13 04:53 AM   Updated: 04/Dec/13 11:59 AM
Component/s: None
Affects Version/s: 5.0.40
Fix Version/s: 5.1.1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Red hat


 Description  « Hide
Hello,

I try to test some Linux shell script function, and I found some bugs.

Or maybe I didn't know the solution yet.

Anyway, I chose "Shell/Batch Command" and try to fill up command box like below:


dir_list[11]=23
dir_list[23]=46
dir_list[45]=UFO

count=$\{#dir_list[*]\}

echo "dir_list: " $count

: It just print out below message

dir_list: ${#dir_list[*]}

It couldn't substitute to value 3.
'\' , escape character, didn't work properly.

How can I resolve it?

Plz help me.
Thank you.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [22/Nov/13 08:59 AM]
${...} will be interpretated by QB for special meaning, and right now the escape (\{ and \}) does not work. Before we fix this issue, please create a separate batch file and call that batch file from QB instead.

Bae JaeHyun [25/Nov/13 12:34 AM]
Thank you for your response.

I want to know when you fix this problem.

Please let me know.

Thank you.

Robin Shen [26/Nov/13 12:30 AM]
We will get it into a patch release with other fixes. Possibly within one week.

Robin Shen [04/Dec/13 11:59 AM]
In 5.1.1, literal ${ needs to be written as $!{