ps2pdf / pdf2ps / unix2dos / iconv / col -b

642阅读 0评论2010-08-08 obsd178
分类:LINUX

man -t file | ps2pdf /dev/fd/0 > file.pdf
-t Use /usr/bin/groff -Tps -mandoc to format the manual page, passing the
output to stdout. The  default  output format of 
/usr/bin/groff -Tps -mandoc is Postscript, refer to  the  manual page 
of /usr/bin/groff -Tps -mandoc for ways to pick an alternate format.
man apachectl | col -b > apachectl.txt
ps2pdf file.ps > file.pdf
pdf2ps file.pdf > file.ps
unix2dos -c ascii -n infile outfile
iconv -f gbk -t utf8 -o file.utf8



#!/bin/bash
#Program:
# Convert encoding of given files from one encoding to another
#History:
#11/22/2009

#read -p "Please input a directory as absolute path: " dir
files=$(ls --format=single-column|grep -v 'iconv.sh')
for filename in $files
do
iconv -f big5 -t gb2312 ${filename} | \
iconv -f gb2312 -t utf8 -o ${filename}
done

上一篇:HOWTO proxy certificates
下一篇:~/.vimrc here