'grep "*:finger"' doesn't work with netstat output such as: tcp6 0 0 [::]:finger [::]:* LISTEN
Use 'grep ":finger"' which always works. Signed-off-by: Simon Xu <[email protected]> --- testcases/network/tcp_cmds/finger/finger01 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/network/tcp_cmds/finger/finger01 b/testcases/network/tcp_cmds/finger/finger01 index 81da3e0..203d746 100755 --- a/testcases/network/tcp_cmds/finger/finger01 +++ b/testcases/network/tcp_cmds/finger/finger01 @@ -61,12 +61,12 @@ do_setup() [ "$LUSER" = "root" ] || end_testcase "MUST BE root to run the test!" - FINGER=$(netstat -a | grep "*:finger" |awk '{print $6}') + FINGER=$(netstat -a | grep ":finger" |awk '{print $6}') if [ "$FINGER" != "LISTEN" ]; then end_testcase "Please start fingerd locally." fi - FINGER=$(rsh -n $RHOST netstat -a |grep "*:finger"|awk '{print $6}') + FINGER=$(rsh -n $RHOST netstat -a |grep ":finger"|awk '{print $6}') if [ "$FINGER" != "LISTEN" ]; then end_testcase "Please start fingerd on remote host." fi -- 1.8.5.4 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
