Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

redirecting with file descriptor

$
0
0
hello,
Someone can help me with redirectors?
I am writing this script in bash enviroment on Fedora:

Code:

exec 4<> /dev/tcp/10.10.11.30/5000    #open socket in input/output
strings<&4 >file.txt &

I send file descriptor 4 to string command to purge data stream from special char while come from connection but if i try to redirect the output to >file.txt I get no data.

Without >file.txt stream is correctly processed and sent to video (stdout)
I have also tryed with tee command without success... where I am getting wrong?

Tnx in advantage


Moderator's Comments:
Please use code tags next time for your code and data.

Viewing all articles
Browse latest Browse all 16232

Trending Articles