Merge pull request #1 from rohammer/master

aktueller Stand
This commit is contained in:
Christian Dresel 2018-08-27 10:36:18 +02:00 committed by GitHub
commit 1300473008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

21
babel_dump_to_file Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
[ $# != 1 ] && echo "parameter tmpfile missing!" && exit
tmpfile=$1
# bind babel-socket to FD3
exec 3<>/dev/tcp/::1/33123
# read and write data
cat <&3 > "$tmpfile" &
# write "dump" to sock
echo dump >&3
# Wait a moment and close FD3
sleep 0.1
exec 3<&-
# and clean up
pkill -P $$