#!/usr/bin/env bash
Probably the most common use of env is to find the correct interpreter for a script, when the interpreter may be in different directories on different systems. The following example will find the `perl’ inter- preter by searching through the directories specified by PATH.
1. #!/usr/bin/env perl One limitation of that example is that it assumes the user’s value for PATH is set to a value which will find the interpreter you want to exe- cute. The -P option can be used to make sure a specific list of directo- ries is used in the search for utility. Note that the -S option is also required for this example to work correctly.
2. #!/usr/bin/env -S -P/usr/local/bin:/usr/bin perl
The above finds `perl’ only if it is in /usr/local/bin or /usr/bin. That could be combined with the present value of PATH, to provide more flexi- bility. Note that spaces are not required between the -S and -P options:
3. #!/usr/bin/env -S-P/usr/local/bin:/usr/bin:${PATH} perl
Category: Uncategorized
Env for scripts interpreter searching
vim remotely edit using scp/sftp/ftp/rsync etc.
Here:
http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw
e.g.:
vim scp://jinlab.com// path/to/file
Perl install module from CPAN
For example:
perl -MCPAN -e ‘install File::List’
Or:
1. perl -MCPAN -e shell # to enter into perl install module command line
2. Enter:
install File::List
[jin@jinlab]$ sudo perl -MCPAN -e shell
[jin@jinlab]$ sudo perl -MCPAN -e shellTerminal does not support AddHistory.
cpan shell — CPAN exploration and modules installation (v1.7601)ReadLine support available (try ‘install Bundle::CPAN’)
cpan>
Ubuntu中pdf的乱码问题
Ubuntu下pdf中文乱码的解决办法
办法一:
使用命令:
[bash]
sudo apt-get install xpdf-chinese-simplified xpdf-chinese-traditional
[/bash]
如果仍然中文乱码的话,需要安装poppler-data, 并且删除/etc/fonts/conf.d/49-sansserif.conf
使用命令:
[bash]
sudo apt-get install poppler-data
sudo cp /etc/fonts/conf.d/49-sansserif.conf /etc/fonts/conf.d/49-sansserif.conf.bak
sudo rm /etc/fonts/conf.d/49-sansserif.conf
[/bash]
选择PDF文件,点击右键,选择XPDF打开即可。
办法二:
安装Foxit Reader for desktop Linux
Foxit Reader is a free PDF document viewer for the Linux platform. 提供一个deb包很方便。
附件:
FoxitReader_1.0-1_i386.deb [3.25 MiB]
下载地址
http://forum.ubuntu.org.cn/download/file.php?id=64192
安装完成后,运行命令FoxitReader,打开PDF阅读器。
Rename Ubuntu box name
On terminal:
[bash]
$ sudo vi /etc/hosts
$ sudo vi /etc/hostname
$ reboot
[/bash]
Refers to:
http://wiki.ubuntu.org.cn/%E6%9B%B4%E6%94%B9%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%90%8D
Top 10 security plugins for wordpress
Refers to:
http://speckyboy.com/2008/04/08/top-10-security-and-protection-plugins-for-wordpress/#comment-311102
10款安全保护类插件分别有:WordPress Database Buckup(WP备份插件),Semisecure Login(加强登录保护),Ask Apache Password Protect,Force SSL(强制SSL),WP Security Scan(安全扫描),Secure Files,WP-SpamFree(防垃圾留言),BackUpWordPress(备份WordPress),Anonymous WordPress Plugns Updates(匿名WordPress插件更新),Replace WP-version(替换WP版本).