help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

control timeout of exec {fd}</dev/tcp/google.com/8242


From: Peng Yu
Subject: control timeout of exec {fd}</dev/tcp/google.com/8242
Date: Wed, 15 May 2024 21:35:24 -0500

Hi,

When a host is on, but a port is not on, exec commands like the
following will take some time before it returns. How can I control the
timeout so that it returns earlier if the port is nonresponsive?
Thanks.

$ time exec {fd}</dev/tcp/google.com/8242
-bash: connect: Operation timed out
-bash: /dev/tcp/google.com/8242: Operation timed out

real    1m15.055s
user    0m0.001s
sys    0m0.004s

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]