#!/bin/bash #获得当前进程的pid echo $$ #获得当前运行shell的文件名 s_name=`echo $0|awk -F'/' '{print $NF}'` echo $s_name