( cmdpid=$BASHPID; (sleep 10; kill $cmdpid) & exec ping www.goooooogle.com )
Installing bash-completion with Homebrew
To install bash-completion, you have to:
brew install bash-completion
And add the following to your ~/.bash_profile:
if -f $(brew --prefix)/etc/bash_completion » ; then
. $(brew --prefix)/etc/bash_completion
fi
#!/bin/bash
{
sleep 5m
kill $$
} &
while true
do
date
sleep 1
done
or
timeout 5m bash script.sh
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'