2012 年二月 一 二 三 四 五 六 日 « 一 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 近期评论
- wlx [微博 ] 发表在《google彻底被封?》
- snake 发表在《google彻底被封?》
- Andrew Pelt 发表在《debian testing上安装oracle 10g》
- tiplip 发表在《webmap.cn使用的WEBGIS技术》
- 求助Evolution问题!! 发表在《evolution crashed in gutsy alpha》
分类目录
标签
anjuta apache backup breezy c++ compile convert dapper debian dns edgy evolution feisty firefox flash gnome gobang GRASS gutsy humor intrepid Linux mailman MapServer mysql openoffice Oracle php phpbb postfix PostGIS postgresql qgis sarge scim skype subversion svn tomcat ubuntu utf8 westdc Windows wordpress 中文
Tag Archives: shell
linux shell获取当前文件的时间
主要的目的是想用文件的创建时间给文件重新命令。这在从数码相机中导入录像的时候有用。 stat geoserver-1.6.5-bin.zip | grep Modify | awk ‘{print $2 $3}’ | cut -d”.” -f1 | sed -e ‘s/-//g’ -e ‘s/://g’ 或者: stat -c %y geoserver-1.6.5-bin.zip | awk ‘{print $1 $2 $3}’ | cut -d”.” -f1 | sed -e ‘s/-//g’ … Continue reading
批量重命名gzip包内文件
应wu要求,转换一个gz文件里的文件名称为gz文件名,而且gz包只有一个文件,其实就是解压缩,然后再压缩。 for i in *.gz;do gzip -d $i && gzip ${i%.gz};done
用shell脚本导入landuse数据到postgis
全国的土地利用数据,80年代末,1995和2000年3期数据,ARCINFO COVERAGE格式,打算直接转入POSTGIS库中。 写了一个shell文件,花费了2天时间。主要是shell的东西是边看边写的,特别是变量处理,还真是麻烦。 运行shell文件要先进入到landuse目录,postgis里应该已经有westdc库,并且已经 进行了POSTGIS初始化,导入过landuse表,并且已经增加了areacode和year字段,不能为NULL,且默认为空值。 从avcbin格式到postgis库,因为数据表的关系,作了两次转换。提出了ARCINFO中的cov#和cov-id字段。 #!/bin/sh # cd /opt/to_reback/data/landuse tmpdata=./tmpdata YEAR=”80年代末 1995年 2000年” for a in $YEAR; do for b in $a/*; do #province, 目录判断 if [ -d $b ]; then rm -fdr $tmpdata for c in $b/ld*; do … Continue reading
gdal.sh自动更新安装
为了gdal更新的方便,写了一个简单的shell脚本: cd /root/gdal/ cvs update ./configure –with-hdf4 –with-netcdf –with-pg=/usr/local/pgsql/bin/pg_config –with-geos –with-libtiff=internal –with-static-proj4 –with-grass=/usr/local/grass-5.7.cvs make clean make make install