标签:ash 功能 arc 主机 用户名 ftime 信息 == 格式
1、统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来id $1 &>/dev/null
&& echo "The $1 already exists" || useradd $1set cursorline
set hlsearch
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: 2hs")
call setline (5,"#QQ: 962248453")
call setline (6,"#Date: ".strftime("%Y-%m-%d"))
call setline (7,"#FileName: ".expand("%"))
call setline (8,"#Description: The test script")
call setline (9,"#Copyright (C): ".strftime("%Y")." All rights reserved")
call setline (10,"#****")
call setline (11,"")
endif
endfunc
autocmd BufNewFile * normal G
标签:ash 功能 arc 主机 用户名 ftime 信息 == 格式
原文地址:https://blog.51cto.com/h880515/2467067