Hi! > - ip route show | head -n1 >$LTPTMP/tst_ip.out 2>&1 || RC=$? > + ip route show >$LTPTMP/tst_ip.out.tmp > + grep "10.6.6.6 via 127.0.0.1 dev lo" $LTPTMP/tst_ip.out.tmp \ > + >$LTPTMP/tst_ip.out 2>&1 || RC=$?
Minus the indentation this looks reasonable, but you can do better and pipe the output from ip route show directly to grep and use -q (quiet). ip route show | grep -q "10.6.6.6 via 127.0.0.1 dev lo" || RC=$? -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list