#!/bin/bash # convert a text file to html using vim built-in function TOhtml # usage: # toHTML text-files # http://scriptdemo.blogspot.com if [ $# -eq 0 ]; then sed -n '3,4p' `which toHTML` exit else for mytxt in $* do if [ -e ${mytxt} ]; then vim -c 'syntax on|TOhtml' -c 'wq|q!' ${mytxt} else echo "${mytxt} is not found" fi done fi |
No comments:
Post a Comment