Execute a command with a timeout
timelimit -t100 somecommand
I found this in Ubuntu repos, and consider it better than timeout.
* View this command to comment, vote or add to favourites * View all commands by CodSpirit
by David Winterbottom (codeinthehole.com)
Today I was working with Solaris and after I had set up the NIS+, DNS server, IP Address and completing the basic setting. I was using the pkg-get util from the freesunware.com
The utility was using wget and it was failing constantly. From the looks of it, it was very clear that the wget utility was unable to find the IP address from the name. Name resolution was not happening, while dig and nslookup was able to do the DNS lookup.
After searching for quite sometime all that I could see was, in one of the forums, \”Did you have NIS enabled?\”
That seemed interesting and thus I got the direction to look for where I can find the solution. And finally I found that in \”nsswitch.conf\” there were settings to find how the various lookups should happen.
For the host entry, I saw that after looking at the nis the lookup would end so I changed the sequence to look at \”files dns\” also and then quit. And it worked. Hope it helps you too 🙂
To get a list of all the scripts in the vim.sf.net project, you can run the following command. This will list all the scripts with the script id.
wget -O – \’http://www.vim.org/scripts/script_search_results.php?&show_me=4000&result_ptr=0\’ -o /dev/null | grep width| grep script_id= |sed \’s/.*script_id=//\’|tr -d \”\”\”|tr \”>\” \” \”|sed \’s/< .*//\’ | tr -d \’\\001\’-\’\\011\’\’\\013\’\’\\014\’\’\\016\’-\’\\037\’\’\\200\’-\’\\377\’ |sort -n