解决linux下vi vim乱码问题

五月 20th, 2010 | 1 Comment | Posted in Shell | 阅读次数: 76

Author:gaojinbo Time:2010-5-20 很多时候需要在linux直接用vi或vim对文件进行编辑,然而好多文件又是gbk编码或windows上复制过去的,常常会出现乱码,严重影响正常工作。  [......]

Read more

Tags:

ubuntu源快速更新脚本 – 1秒钟替换为国内ubuntu镜像

十月 13th, 2009 | 2 Comments | Posted in Shell, Ubuntu | 阅读次数: 16

制作:高进波 时间:2009-10-13 制作此脚本是方便ubuntu用户更换国内快速的ubuntu源,支持4个发行版hardy,intrepid,jaunty,karmic   1.编写更新脚本 vi hugwww[......]

Read more

Tags: ,

用脚本修改UBUNTU源为archive.ylmf.net

九月 10th, 2009 | 1 Comment | Posted in Shell, Ubuntu | 阅读次数: 22

vi ylmf-apt.sh

#!/bin/bash
#power by hugwww
#change apt source

#ubuntu 8.04
if [ $(cat /etc/lsb-release |grep "[......]

Read more

强大的sed编辑器

八月 31st, 2009 | 1 Comment | Posted in Shell | 阅读次数: 18

制作:高进波
时间:2009-08-31

sed是一种新型的,非交互式的编辑器,功能非常强大,可用来修改文件内容等

下面只记录了常用的功能:

1.只打印文件某行
sed -n ’3,5p’    /etc/passwd[......]

Read more

GBK-UTF-8文件编码批量转换脚本

八月 23rd, 2009 | 1 Comment | Posted in Shell | 阅读次数: 23

find default -type d -exec mkdir -p utf/{} \;
find default -type f -exec iconv -f GBK -t UTF-8 {} -o utf/{} \;

这两行命令[......]

Read more