码迷,mamicode.com
首页 > 系统相关 > 详细

linux command wrap

时间:2017-08-20 10:00:16      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:ges   pac   files   scope   comm   ted   direct   director   generated   

$ cat tmux-attach

1 if [ -z $1 ] ; then
2    tmux ls
3 else
4    tmux attach -t $1
5 fi

 

$ cat /usr/bin/cscope-go.sh

 1 #!/bin/bash
 2 
 3 # generate cscope index files in current directory
 4 # the generated cscope index files also include go standard packages
 5 
 6 if [ "$GOROOT" = "" ] ; then
 7 echo "GOROOT is not set"
 8 GOROOT=`go env |grep "GOROOT" |cut -d "=" -f2`
 9 GOROOT=${GOROOT#\"}
10 GOROOT=${GOROOT%\"}
11 fi
12 echo $GOROOT
13 
14 go_pkg_src=$GOROOT/pkg
15 
16 find $go_pkg_src -name "*.go" -print > cscope.files
17 find . -name "*.go" -print >> cscope.files
18 
19 if cscope -b -k; then
20         echo "Done"
21 else
22         echo "Failed"
23         exit 1
24 fi

 

linux command wrap

标签:ges   pac   files   scope   comm   ted   direct   director   generated   

原文地址:http://www.cnblogs.com/shaohef/p/7398471.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!