Error parsing array variables(values separated by commas) using Chef

Hi All,

I have the following code , i am trying to run and i face 2 different
issues ,

  1. The last value in my for loop gets an extra ^J character.
  2. I get another error for my bash resource

i have been trying to debug it for hours now,
the logic is to read a property file a comma delimited value and then run
some action on it

Please help

my is like this :

*pbldejksu300:acc1,acc2 *


chef recipe :

cookbook_file “/local_app/#{node[:tcat][:war_name]}.properties” do
source "#{node[:tcat][:war_name]}.properties"
mode 0777
owner "deploy"
group "deploy"
end " host name is #{node[‘hostname’]} "
puts " hostname is #{host}"
output=cat /local_app/ | grep -i "#{host}" | cut -d":" -f2
node.set[‘data’][‘acc_deploy’]=output "Found correct value #{output} " "Found correct value again #{node[‘acc_deploy’]} "

node[:data][:acc_deploy].each do |data|
data.chomp "Found correct value wow #{data} "
base=“install_tcat_” + data "Found correct value wow #{base} "
directory “/local_app/test/#{data}” do
owner "deploy"
group "deploy"
mode 0755
action :create
notifies :run, “bash[inst_tcat_data]”, :immediately

*Error logs : *

[deploy@pdevecsas300 ~]$ ls /local_app/test/
acc1 acc2? — the acc2 here got the extra ? i am not sure why and
where from , the array was parsed correctly i believe

*also i get this error in the bash resource … *

[2013-11-15T18:09:39-08:00] INFO: Found correct value wow

[2013-11-15T18:09:39-08:00] INFO: Found correct value in the loop now

Converging 5 resources
[2013-11-15T18:09:39-08:00] INFO: Running queued delayed notifications
before re-raising exception
[2013-11-15T18:09:39-08:00] ERROR: Running exception handlers
[2013-11-15T18:09:39-08:00] FATAL: Saving node information to
[2013-11-15T18:09:39-08:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-11-15T18:09:39-08:00] FATAL: Stacktrace dumped to
[2013-11-15T18:09:39-08:00] FATAL: ArgumentError: You must have a string
like resource_type[name]!