Learn about Linux
Download Linux
Get Linux help
Get special offers on:
Linux Application Dev Programming Software
Email:
or alternatively:
lsof | awk '$0~/\/usr\/apps\/payroll/{print $0}' | awk '{print $2}' | uniq | awk '{print "netstat -p | grep "$1}' | sh | awk '{print $5'} | awk -F: '{print $1}' [Modified by: Anonymous on October 10, 2007 04:31 AM]
#
Return to A script to tell which workstations are using Samba shares
© Copyright 1999-2008 - SourceForge, Inc., All Rights Reserved About Linux.com - Privacy Statement - Terms of Use - Advertise - Trademark - Ask Linux Questions - Write for Us - RSS Feed ThinkGeek - Slashdot - SourceForge.net - freshmeat - Surveys - Jobs
do it in one line with awk, no tmp file needed
Posted by: Anonymous [ip: 172.16.176.1] on October 09, 2007 01:08 AMor alternatively:
lsof | awk '$0~/\/usr\/apps\/payroll/{print $0}' | awk '{print $2}' | uniq | awk '{print "netstat -p | grep "$1}' | sh | awk '{print $5'} | awk -F: '{print $1}'
[Modified by: Anonymous on October 10, 2007 04:31 AM]
#