Tag Info

Hot answers tagged

9

This is what Bash while loops do: while /path/to/application.app do : done It will run the application, and if it terminates successfully run the body of the loop. : is the shell's no-op command (the loop has to have a body, so that's what we put there); after that it goes back to the top and runs the program again. If it fails, the loop stops running ...


4

In Linux, you can try this: top -bn1 > output.txt From man top: -b : Batch-mode operation Starts top in 'Batch' mode, which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the ...


2

In MacVim, you need to unmap the Edit > Paste menu item in order to override the shortcut, then you can remap Cmd-V (D-v in MacVim parlance) to the appropriate command in each mode. I added this to my ~/.gvimrc and now everything works wonderfully: macmenu Edit.Paste key=<nop> noremap <D-v> "*P cnoremap <D-v> <C-r>* inoremap ...


1

I would comment for your follow-up question but lack enough reputation. To get similar type numbers from a Windows system you will want to take a look at powershell. Just to get a list of processes you and look at get-process. Take a look at this reference. In doing some further searches, found a nice little command here. Which if you take out of the ...


1

I have extended your script, so that you can run it once on startup and it will do it's job between 9PM and 9AM. #!/bin/bash -· LOGFILE="/tmp/autotest_run_count.txt" trap "echo manual abort; exit 1" 1 2 3 15 RUNS=0 while [ 1 ] ; do· HOUR="$(date +'%H')" if [ $HOUR -ge 21 -a $HOUR -lt 9 ] ; then # run program libreoffice || exit 1 ...



Only top voted, non community-wiki answers of a minimum length are eligible