ATF-devel archive

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

Re: CVS commit: src/tests/lib/libc/ssp (fwd)



On Wed, Dec 29, 2010 at 11:32 AM, Antti Kantee <pooka%cs.hut.fi@localhost> 
wrote:
>
> On a tangent, how do you access fields in awk in an atf_check pipeline?
> I tried and I tried, and ended up having to use a temporary file and a
> non-pipelined atf_check (tests/usr.sbin/traceroute):
>
>    atf_check -o inline:'1.2.3.1\n2.3.4.5\n' awk '{print $2}' < tmpfile
>
> (verified answers only, please ;)

This works (at least it does here):

        atf_check -s exit:0 -o inline:'1.2.3.1\n2.3.4.5\n' -e ignore -x \
            "rump.traceroute ${1} -n 2.3.4.5 | awk '{print \$2}'"

-- 
Julio Merino


Home | Main Index | Thread Index | Old Index