This is REALLY got me stumped..
I'm trying to run a simple bash command for N seconds then force it to kill/stop/halt.
The command is:
Code:
$ gpspipe -r > nmea.data
What this does is throw a BUNCH of NMEA strings from my GPS receiver into the nmea.data text file. The problem is I have to manually stop this command with ^C or it will literally run forever. I simply want this command to run for about 3 to 5 seconds then stop on its own.
How can I alter my command to make it do this? I'd prefer to have this as a 'one-liner', but if need be I can create a bash script.
Please help! Thanks!