All 13 entries tagged Unix
View all 19 entries tagged Unix on Warwick Blogs | View entries tagged Unix at Technorati | There are no images tagged Unix on this blog
May 01, 2007
Apache rewriting
A good article about Apache rewrite: Module mode_rewrite
mod_rewrite, the Swiss Army Knife of URL manipulation!
April 01, 2007
A good entry about crontab
Writing about web page http://www.dbanotes.net/techmemo/crontab_tips.html
A very good article about crontab.
September 04, 2006
Quotes in Unix Shell and JSTL
Double quote and single quote is different.
Double quote: Everything between quotes is take literally, except for the following characters that keep there special meaning:- $ variable substitution will occure
- ` command subtitution will occure
- \ escape next character
- ! history character
- newline
- ! history
- newline.
For my scripts, it is much safer to use double quote.
One of my script is like this:
/usr/bin/egrep '$2' $1
if [ $? -eq 0 ] ; then
the single quote surounding $2 caused confusion.
Not so sure about their difference in JSTL. In the “Core JSTL” book, single quote is used.
March 07, 2006
shell conditional testing
Writing about web page http://www.oracle.com/technology/pub/articles/dulaney_test.html
I keep on forgeting the syntax of bash shell condition syntax. So i have to write it down now.
[ condition ] :
note the space between each side the condition when using square brackets.
"[" actu
String Comparation
=, !=, -z (string is null), -n (not null)
Numbers
-eq, -ne, -gt, -lt, le,ge
e.g.:
[ "$number" -eq "10"] or [ $number -gt 30 ]
"0" means true
"1" means false
September 08, 2005
Users are impatient
Follow-up to Play with Suse Linux from Oracle/Java/Others
I tried to install oracle htmldb on my suse linux box. The pre-install check told that I should install compat-db-4.0.14 firstly. I download the rpm and the check passed and the installtion process began.
The post-install configure reported it cannot found libdo.so.2. I dug arround and cannot find appropirate rpm for suse.
I become impatient since i only want to do a quick test this product. I went back to Solaris platform and install same product on this platform and it works straight away.
It is shame that some many different variance of linux there. It is fun to learn linux, but for a quick test, you better choose a platform distrubute by a sole vendor, like microsoft and solaris.
August 26, 2005
Play with Suse Linux
I have tested solaris 10g for one weeks and discovered several shortingcomings. I canot easily change the default keyborad layout.It also lack of application server. I canot run eclipse and oracle on this.
Today i dumped it and switch to Suse linux. It turned out be to a great experience. It support chinese and i try to input chinese in the instance messenger and it works perfect.
August 05, 2004
Set up printer
Set up printer
add compenent in control panel for LPR port type.
then set
printer.warwick.ac.uk:wwits02ps HP LaserJet 5000 Series PS
printer.warwick.ac.uk:wwits01ps HP Color LaserJet 4550
whereis
/usr/ucb/whereisputty setup
1. Generate your keys;
run puttygen along the bottom select ssh2 dsa and then click on generate, follow the instructions, do not type in a passphrase if you do not want to input password every time. and then save the public & private keys.2. Copy your public key into your unix home directory:
You need to set up ssh2 for your unix code 1st, run ssh-keygen2 when logged into unix. When it's done, cd into ~/.ssh2 (and if interested, do an ls -l, this where the key went). FTP your putty public key to here, call it something like public-putty-key.pub Edit the authorization file add the new line: Key public-putty-key.pub3. Use putty;
Select Session and select SSH, type in hawker at the hostname box (at this point if you go to the saved session box, give it a name like hawker & select save you can retrieve these settings next time). select Connection, in the auto-login username type your username. select Connection/ SSH, click on SSH protocol version 2. select Connection/ SSH/Auth, give it the location where private key is. Click on Open when you are ready. The first time you use it you will get a prompt about the server's key not being saved & do you trust it, select yes, this won't happen again.Find out shell
echo $SHELL
/bin/sh (Bourne shell)
/etc/profile
$HOME/.profile
/usr/local/bin/bash (Bourne-Again SHell)
/etc/profile
$HOME/.bash_profile
$HOME/.bash_histroy
$HOME/.bashrc(interactive) (that mean when you type in bash to change the shell, the .bashrc file will be executeed, the old enviroment still exist. very useful!)
$HOME/.profile (if .bash_profile not found)
.bash_logout
Hongfeng Sun
Please wait - comments are loading

