Wycked error

Hi,

When I run the wycked command, I get the following error:

example:

> wycked 176 abc

#const a=; c=;
{a} {a} {c} {90} {90} {120}
1 0 0
0 1 0
0 0 1
#const
…wycked: line 62: ${site}=“${site^}”;: bad substitution

It seems to be crashing on this line:

echo ${site}=“${site^}”;

Any ideas on what might be causing this? Thanks a lot. - Justin

It works! Thanks a lot. - Justin

try changing the 1st line of the script to

#!/bin/bash

Let me know if this works!

Opening wycked, I see that it already started with:

#!/bin/bash

I tried changing it to:

#!/bin/sh

But I get the same error. Thanks. - Justin

Sorry - I didn’t realized I had fixed that part in the distribution already.
Now try (on the command line, assuming you are running bash, otherwise first type bash):

site=dummy
echo ${site}=\"${site^}\"\;
echo ${site}=\"${site^}\"
echo ${site}=\"${site^?}\"
echo ${site}=${site^}
echo ${site}=${site}
echo ${site}
echo $site

I get:

> site=dummy
> echo {site}=\"{site^}";
bash: {site}=\"{site^}";: bad substitution
> echo {site}=\"{site^}"
bash: {site}=\"{site^}": bad substitution
> echo {site}=\"{site^?}"
bash: {site}=\"{site^?}": bad substitution
> echo {site}={site^}
bash: {site}={site^}: bad substitution
> echo {site}={site}
dummy=dummy
> echo ${site}
dummy
> echo $site
dummy

Thanks for the education here. I assume I should just change that line to:
echo {site}={site}

Let me know if this is not correct. Thanks a lot. - Justin

Ok then, just replace

site^

BY:

site

The only negative consequence is that the site name in quotes in the output won’t be capitalized. No big deal. Apparently the "^" syntax only works for bash 4.0 and above…

A better fix: change:

echo ${site}=\"${site^}\"\;

to

echo ${site} | awk '{print $1"=\"" toupper($1) "\";"}'

I’ll include that in the next version.

-Axel