1.if the os is windows, the file type will be dos by default. So if you new a shell script, then run it in cygwin, the error like “who/r command not found” will happen. The solution is changing the file type to unix. A approch is using vi. In vi, use “:set ff?” to inquiry file type. Then use “:set fileformat=unix” or “:set ff=unix”.

2.In my machine, cygwin.bat is:bash –login -i. This will let shell be a login shell. But only an interactive shell that is not a login shell will read and execute ~/.bashrc. If we want our personal bash, we should create a .profile file in home directory instead of of .bashrc. One example is:

alias h=”history”
alias hg=”h|grep”

#alias ls=’ls –color=auto’
alias la=’ls -A’
alias lf=’ls -F’
alias ll=’ls -l’

 3.use wget with proxy. create a .wgetrc in home directory.

http_proxy = proxy.com:81
no_proxy = localhost

This will make wget to fetch data with proxy by default and you didn’t need to swith to proxy model by ” -Y on”.