Linux support vs Debian support (was ... Re: split(): syntax error near unexpected token `(' ... [OT])

2013-11-29 Thread Chris Bannister
On Fri, Nov 29, 2013 at 04:39:35PM +, Tom H wrote: > On Fri, Nov 29, 2013 at 3:51 AM, Scott Ferguson > wrote: > > > > Please note - this has *nothing* to do with Debian, I've marked it OT > > accordingly. > > > > Unless you are asking about Debian peculiarities or whether to raise bug > > repo

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

2013-11-29 Thread Scott Ferguson
On 30/11/13 03:39, Tom H wrote: > > This is your opinion (just as it was your opinion to say the same > thing to the person asking about bogofilter recently). WTF? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@

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

2013-11-29 Thread Tom H
On Fri, Nov 29, 2013 at 3:51 AM, Scott Ferguson wrote: > > Please note - this has *nothing* to do with Debian, I've marked it OT > accordingly. > > Unless you are asking about Debian peculiarities or whether to raise bug > report please consider posting these sorts of queries to somewhere > approp

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

2013-11-28 Thread Jonathan Dowland
On Fri, Nov 29, 2013 at 03:13:49PM +1100, Scott Ferguson wrote: > Is the point to this a troll. Are you trolling? Because $IFS hasn't been > initialised Please try to be more civilised. If you aren't positively interested in this thread, move on to another. -- To UNSUBSCRIBE, email to debia

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

2013-11-28 Thread Scott Ferguson
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: > >> 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. > >> IFS=":"

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

2013-11-28 Thread Neal Murphy
Bash does not have a split function. To split in bash, one has to do it the old-fashioned way: declare -i i declare -a myArray OIFS=$IFS IFS=":" set `egrep root /etc/passwd` IFS=$OIFS # Store the new positional parameters in indexed array myArray. i=0 while [ ! -z $1 ]; do myArray[$i]=$1 sh

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

2013-11-28 Thread Scott Ferguson
On 29/11/13 14:51, Scott Ferguson wrote: > Please note - this has *nothing* to do with Debian, I've marked it OT > accordingly. > > Unless you are asking about Debian peculiarities or whether to raise bug > report please consider posting these sorts of queries to somewhere > appropriate like stack

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

2013-11-28 Thread Scott Ferguson
Off-off topic for Debian User lists. On 29/11/13 14:42, Albretch Mueller wrote: > #!/bin/bash > > _DT=$(date +%Y:%m:%d:%H:%M:%S) OK... > echo "// __ \$_DT: $_DT" Huh? Is there a point to that exercise (print gibberish to screen)? $_DT remains $(date +%Y:%m:%d:%H:%M:%S) [wave of diziness] >

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

2013-11-28 Thread Scott Ferguson
Please note - this has *nothing* to do with Debian, I've marked it OT accordingly. Unless you are asking about Debian peculiarities or whether to raise bug report please consider posting these sorts of queries to somewhere appropriate like stackoverflow, gawk lists or such like. Thanks. On 29/11

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

2013-11-28 Thread Albretch Mueller
#!/bin/bash _DT=$(date +%Y:%m:%d:%H:%M:%S) echo "// __ \$_DT: $_DT" SavedIFS="$IFS" IFS=":" _dpvals_arr=( $_DT ) # date place values echo "// __ total numbers: ${#_dpvals_arr[@]}" for _dp in "${_dpvals_arr[@]}" do echo "$_dp" done IFS="$SavedIFS" ~ lbrtchx -- To UNSUBSCRIBE, email to debia

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

2013-11-28 Thread Albretch Mueller
> What is "array" supposed to do? [??] > What did you want the script to do? ~ chemie.fu-berlin.de/chemnet/use/info/gawk/gawk_13.html#SEC126 ~ split(string, array [, fieldsep]) This divides string into pieces separated by fieldsep, and stores the pieces in array. The first piece is stored in

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

2013-11-28 Thread Scott Ferguson
On 29/11/13 12:38, Albretch Mueller wrote: > n = split($_az,array," ") What is "array" supposed to do? [??] What did you want the script to do? Kind regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lis