timeout 5s <COMMAND>
-> Starts COMMAND, and kills itself after 5 seconds
-> Starts COMMAND, and kills itself after 5 seconds
This blog provides some ready-made tips, tricks, tweaks & interview questions-answers on C, C++, Perl, Shell Scripting and UNIX Commands.