Hi, A bit of an OT question. I am writing a bourne shell script that collects data from a router. Since netstat & vmstat can run for a numbers of iterations I thought I would use just that:
stats() ( nstats=`netstat -I ng0 -q 1 60 | tail -1` & rawdata=`vmstat -c 2 60 | tail -1` wait ... The logic was: 1. run the first process in the bg 2. run the second process 3. wait to make sure the first process has finished 4. continue further It makes perfect sense why this doesn't work. Both commands run in the foreground. I am going to split the time between netstat and vmstat. So, it will be 30 seconds of netstat and 30 seconds of vmstat. But I am still interested/curious how one should go for this using the shell. So, can this be done without files? Any thoughts? Thanks, Nikos _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"