finger01: fix grep command
PATCH 1/1 finger01: fix grep command
'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(-)
testcases/network/tcp_cmds/finger/finger01 +2 -2
@@ -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
Signature · 13 lines
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
Hi!
Quoted 5 lines
'grep "*:finger"' doesn't work with netstat output such as:
tcp6 0 0 [::]:finger [::]:* LISTEN
Use 'grep ":finger"' which always works.
Pushed, thanks.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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