I've got a shell script with the following code;
#!/bin/bash
nfcapd -z -w -t30 -p 2055 -l /home/shane/Documents/nfdump
My problem is that when I execute the shell script, the command above executes over and over (it captures network traffic from a router), but I'd like for it to stop after 30 seconds. In the terminal I would just press Ctrl+c, is there a way of executing this command (Ctrl+c) after a certain time t?