1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00
freebsd-ports/net/smb4k/files/smb2awk
Simon Barner 6386814985 Add smb4k 0.6.3,
kDE 3.x SMB Network browser and SMB shares
mounting center.

PR:		88269
Submitted by:	Rashid N. Achilov <shelton@granch.ru>
2005-11-17 12:14:31 +00:00

31 lines
623 B
Awk

#!/usr/bin/awk -f
# AWK part for generating Windows/Samba boxes list in .nsmbrc format
# Incoming - findsmb output, outgoing - NetBIOS names list
# $Id: smb2awk,v 1.2 2003/10/30 09:41:10 shelton Exp $
{
while ((getline nline) > 0)
{
if (substr(nline,1,1) == "-")
{
sig = 1
continue
}
if (sig == 0)
continue
else
{
split(nline,narray," ")
if (narray[2] == "unknown")
next
else
if (index(narray[2],".") != 0)
next
else
print narray[2]
}
}
}