Friday July 31, 2009 |
Using Cygwin to manage script Virtual Box tasksThe Virtual Box GUI doesn't do everything one needs and so I have been experimenting with using cygwin, a free to use bash shell library. Having installed CYGWIN the first thing to do is add the Virtual Box program folder to the PATH, in my case, export PATH=/cygdrive/c/Program\ Files/Sun/xVM\ VirtualBox:${PATH}
I want this placed in the .bashrc so its always invoked, and thus need to test if is already in the path. I use this code, type -p VBoxManage.exe > /dev/null
case $? in
0) # Its already there
: ;;
1) # Add Path
export PATH=/cygdrive/c/Program\ Files/Sun/xVM\ VirtualBox:${PATH} ;;
esacNow I need to associate a script file type with an execution program. I have tried to use the distributed batch file and binary and neiter of these work, so I have copied cygwin.bat to bash.bat and amended it so that it reads as follows @echo off
:: Dave Levy (c) 2009 Is this GPL?
:: bash.bat Version 1.0
:: Wrapper to run *sh scripts from windows explorer/desktop
c:\ksh\bin\bash --login %*I have deleted the -i flag from the bash line, I have made the bash program call absolute, %* is the DOS batch command file syntax equivilant to $* i.e. all the command line arguments, so the command line invokes bash.exe in login mode to force the execution of .bash_profile and .bashrc and appends all the other command line parameters including the script file name. :: is a neater comment delimiter than REM. I have associated my batch file with the file type .ksh as the open method using explorer. Much of CYGWIN is distributed under the GPL and I am unclear if the batch file is included, If so, its GPL since I created the file by copying it. keywords: howto invoke cygwin scripts from the windows desktop, write a dos batch file to invoke shell tags: technology virtualbox shell scripting cygwin windows (2009-07-31 06:58:27.0) Permalink Good British UniversitiesWhy is the LSE not one of the top Universities in the world according to the Academic Ranking of World Universities? I scattered some thoughts on the UK Higher Education system in an article on my blog the other month and promised to look and see what Shanghai Jiao Tong University's methodology thought of, what I thought to be three highly competitive British Universities, i.e. LSE, Sussex and Warwick, which had failed to make the top 100 of their 2007 ranking. I have come to the conclusion that what seems to me an anomaly, illustrating either a flaw in the methodology, or a misuse by me as the ranking's design goal does not meet my needs. However the same criticisms I have discovered are also mentioned on Wikipedia in their article on ARWU as part of a discussion on University Ranking. On further study, I feel the breadth of the index is incredibly narrow. I also question the appropriateness of the individual scores for the purposes they claim. The use of the survey by the Economist and EU Commission and its eco-system really needs to be questioned. I have some more detailed comments about the index and the Guardian's scores if you Read More. [Read More](2009-07-31 06:48:55.0) Permalink |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||