shell script auto generate the relevant header information
first : add follow context in /etc/vim/vimrc
set ignorecase
set cursorline
set autoindent
autocmd BufNewFile *.sh exec ":call SetTitle()"
func SetTitle()
if expand("%:e") == 'sh'
call setline(1,"#!/bin/bash")
call setline(2,"#")
call setline(3,"#********************************************************************")
call setline(4,"#Author: panzidong")
call setline(5,"#Date: ".strftime("%Y-%m-%d"))
call setline(6,"#FileName: ".expand("%"))
call setline(7,"#URL: https://www.cnblogs.com/lianghong881018")
call setline(8,"#Description: The test script")
call setline(9,"#Copyright (C): ".strftime("%Y")." All rights reserved")
call setline(10,"#********************************************************************")
call setline(11,"#")
call setline(12,"")
endif
endfunc
autocmd BufNewFile * normal G
second: create new shell scipt
vim pan.sh

shell script auto generate the relevant header information的更多相关文章
- Shell Script Basics
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/shell_scr ...
- (copy) Shell Script to Check Linux System Health
source: http://linoxide.com/linux-shell-script/shell-script-check-linux-system-health/ This article ...
- PHP错误Warning: Cannot modify header information - headers already sent by解决方法
这篇文章主要介绍了PHP错误Warning: Cannot modify header information - headers already sent by解决方法,需要的朋友可以参考下 今天在 ...
- How to Create a First Shell Script
How to Create a First Shell Script Shell scripts are short programs that are written in a shell pr ...
- 学习shell script
摘要:概述.script的编写.test命令.[]判断符号.默认变量($1...).if...then条件判断式. 一.概述 [什么是shell script] 针对shell所写的脚本,将多个命令汇 ...
- Shell script之How to write
Write shell script: 1) Editor like vi or mcedi 2) Set execute permission for your script chmod perm ...
- shell script简单笔记
变量 shell script是一种脚本语言,变量的定义是通过 myName=HYB 这样的形式定义的. 当存在空格时,可以通过双引号或单引号将其变为字符串.双引号不进行转义,单引号将内容进行转义为一 ...
- shell 编程 && bash 简介(shell 变量、shell操作环境、数据流重导向、管线命令、shell script)
如何学习一门编程语言 数据类型 运算符 关键字 1 认识BASH 这个shell linux是操作系统核心,用户通过shell与核心进行沟通,达到我们想要的目的.硬件.核心.用户之间的关系: 原理:所 ...
- shell及脚本4——shell script
一.格式 1.1 开头 必须以 "# !/bin/bash" 开头,告诉系统这是一个bash shell脚本.注意#与!中间有空格. 二.语法 2.1 数值运算 可以用decla ...
随机推荐
- JAVA中”单引号”,“双引号”,“没有单引号和双引号”区别:
单引号引的数据 是char类型的——>单引号只能引一个字符(表示单个字符)双引号引的数据 是String类型的——>而双引号可以引0个及其以上(引用字符串) char类型的值用单引号引起来 ...
- ios手机域名https协议注意事项
加载网页版链接框架不能用http 1.下载到本地 2.转换为cdn https
- lua --- 逻辑运算符小结
lua中的逻辑运算符,认为只有false.nil为假,其他的都为真(包括0.空串) a and b -- 如果a为false,则返回a,否则返回b a or b -- 如果a为true,则返 ...
- C# 连接PDA扫码枪
Symbol扫码枪开发文档 一.主要功能 实现symbol扫码枪和PC数据交互. 二.运行环境 SymbolMC32NO 三.开发工具与软件 开发环境:Win7 开发语言:C# 数据库:Sql Ser ...
- Using Option Files
Most MySQL programs can read startup option files(sometimes called configuration files). Option file ...
- (原创)PBS | SGE 智能任务投递系统monitor | python实现
之前看到过高手写的一个monitor,用python面向对象实现的,依赖几个核心的python包,drmaa,zodb,理论上来说解决了所有的任务投递问题. 但是在复杂的集群环境下还是会经常出问题,这 ...
- Hibernate相关的查询 --Hibernate框架基础
接着上一篇博文:Hibernate第一个程序(最基础的增删改查) --Hibernate本例是对Hibernate查询的扩展,使用HQL语句查询 /** * HQL添加预先需要保存的测试数据 */ @ ...
- linux文件管理之查找
1 文件查找 1.1 which 查找可执行文件的路径which是通过 PATH环境变量到该路径内查找可执行文件,所以基本的功能是寻找可执行文件[root@www ~]# which [-a] com ...
- Confluence 6 设置你的个人空间主页
不论你是否正在使用个人空间为沙盒来测试一些内容,组合灯显示是如何工作的,一个能够导航到其他空间和内容的页面,或者一些完全不同的东西.下面一些红能够帮助你在你的个人空间中更加有效的使用和发布信息. 使用 ...
- 自定义Exception异常
自定义异常构建 首先写一个自定义异常,继承Exception,代码如下 public class NoMappingParamString extends Exception { /*无参构造函数*/ ...