[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: split(): syntax error near unexpected token `(' ... [OT]



On 29/11/13 15:13, Scott Ferguson wrote:
> Off-off topic for Debian User lists.
> 
> On 29/11/13 14:42, Albretch Mueller wrote:

<snipped>

> 
>> SavedIFS="$IFS"
> 
> Hu-uh?

[slaps head]

My bad. You're storing the value of built-in variable, not as I
foolishly 'thought', a custom variable.

<snipped>
> 
>> IFS=":"
> 

Line feed now set to ":"

> 
>> _dpvals_arr=( $_DT ) # date place values
> 
> Can I suggest a one line solution to this? - all that bizarre
> contortionism could be avoided with:-
> _dpvals_arr=$(date +Y)
> 
> Unless your point was *not* to make $_dpvals_arr == 2013
> You do have a point right?

It still doesn't change the value you're working with which is the year.

> 
> 
>> echo "// __ total numbers: ${#_dpvals_arr[@]}"
> 
> 2+0+1+3=6
> 
> <snipped>
> 
> 
> Can't help you.
> 
> 
> Regards
> 

Still, hopelessly confused by what you're doing and what you want to
achieve.


Kind, but dazed and confused, regards.


Reply to: