GNU parallel treats input as a single token [SOLVED]

I have a bash script that expects three tokens that I'd like to push through parallel. The problem I am experiencing is that when I cat a text file and pipe it into parallel, the spaces in the tokens are not treated as such; they are treated as a single token.

Here is a simplified script: ~/bin/action

#!/bin/bash
echo "first = $1"
echo "second = $2"
echo "third = $3"

If I simply run it like so, I get the expected output:

% ~/bin/action a b c
first = a
second = b
third = c

So to use parallel, I place the "a b c" into a text file that I cat and pipe into parallel but all of the tokens become $1 as you can see:

Re: GNU parallel treats input as a single token [SOLVED]

Did you not find the manpage?

--delimiter delim-d delimInput items are terminated by the specified character. Quotes and backslash are not special; every character in the input is taken literally. Disables the end-of-file string, which is treated like any other argument. This can be used when the input consists of simply newline-separated items, although it is almost always better to design your program to use --null where this is possible. The specified delimiter may be a single character, a C-style character escape such as \n, or an octal or hexadecimal escape code. Octal and hexadecimal escape codes are understood as for the printf command. Multibyte characters are not supported.

Re: GNU parallel treats input as a single token [SOLVED]

@falconindy - I saw that but am unclear how to make use of it to treat items in a line as tokens... for example: my goal is to have a whole list of items in the worklist and have them treated as $1 $2 and $3 on a per-line basis.

Re: GNU parallel treats input as a single token [SOLVED]

@falconindy - Thank you for the suggestion. It seems that the correct way to invoke parallel in the fashion I want is to use the -a switch so you were close

parallel -a worklist --colsep ' ' ~/bin/action
first = a
second = b
third = c
first = d
second = e
third = f
first = g
second = h
third = i
first = j
second = k
third = l
first = m
second = n
third = o
first = p
second = q
third = r
first = s
second = t
third = u
first = v
second = w
third = x
first = y
second = z
third = 1