steve fiedler on 11 Aug 2015 08:24:26 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Need Help with a script for netcat |
didn't work with the while loop either.... I just tried it with a -w 3600, assuming it would wait 3600 seconds til it disconnected. Started it up with an ampersand, called the PBX, hung up. Tail -f the file from a different putty session and saw the info for the call come in....then I saw this on the screen.
[1]+ Stopped ./get_smdr.sh If I do a ps -ef | grep get_, or grep for netcat, both are still running but its not updating the file any longer. If I kill the pid for get_smdr.sh, it then says killed and kills the pid for netcat and if I restart, works fine again for a bit. What is the difference between stopping and killing? I thought that maybe the PBX was sending a terminate or end command but that would not effect the get_smdr script and besides, in the foreground, will run all day long Thanks, Steve Date: Tue, 11 Aug 2015 10:17:28 -0400 From: kperry@daotechnologies.com To: plug@lists.phillylinux.org Subject: Re: [PLUG] Need Help with a script for netcat Have you tried wrapping it in a while loop? Something along the lines of... while [ 1 ] do INFO=$(hostname | cut -c 4-7)_$(date +%Y%m%d) /usr/bin/netcat -l -n -p 6000 >> /tmp/smdr_$INFO done ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Keith C. Perry, MS E.E. From: "steve fiedler" <a31modela@hotmail.com> To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org> Sent: Tuesday, August 11, 2015 9:34:04 AM Subject: Re: [PLUG] Need Help with a script for netcat i did try the -d option, not a valid option in netcat v 1.1. Could only find the -d option on a version for windows. Thanks, Steve Date: Tue, 11 Aug 2015 09:21:19 -0400 From: jonathan@jdsnetwork.com To: plug@lists.phillylinux.org Subject: Re: [PLUG] Need Help with a script for netcat Try adding -d option to netcat On Aug 11, 2015 8:59 AM, "steve fiedler" <a31modela@hotmail.com> wrote:
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug |
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug