<< Back to previous view

[QB-1854] At Shell/Batch Command step, linux shell script cannot substitute a array variable
Created: 22/Nov/13  Updated: 04/Dec/13

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 5.0.40
Fix Version/s: 5.1.1

Type: Bug Priority: Major
Reporter: Bae JaeHyun Assigned To: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Red hat


 Description   
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.

 Comments   
Comment by 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.
Comment by 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.
Comment by Robin Shen [ 26/Nov/13 12:30 AM ]
We will get it into a patch release with other fixes. Possibly within one week.
Comment by Robin Shen [ 04/Dec/13 11:59 AM ]
In 5.1.1, literal ${ needs to be written as $!{
Generated at Thu May 16 10:48:07 UTC 2024 using JIRA 189.