Debian Codegraph @

jnettop-lookup-nmb

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 #
4 # jnettop, network online traffic visualiser
5 # Copyright (C) 2002-2005 Jakub Skopal
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #
21 # $Header: /cvsroot/jnettop/jnettop/jnettop-lookup-nmb,v 1.2 2005/07/01 10:25:37 merunka Exp $
22 #
23
24 # This is an example script doing IP lookups thru SAMBA name servers. It either returns
25 # name resolved from the appropriate IP address or nothing if no name is found.
26
27 nmblookup -A $1 | sedscip-shell system . . sed. -n '
28 1 d
29 2 {
30 /^\t/ {
31 s/^\t\([^ ]*\) .*/\1/
32 p
33 }
34 }
35 '
36