$ cat tmux-attach

 if [ -z $ ] ; then
tmux ls
else
tmux attach -t $
fi

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

 #!/bin/bash

 # generate cscope index files in current directory
# the generated cscope index files also include go standard packages if [ "$GOROOT" = "" ] ; then
echo "GOROOT is not set"
GOROOT=`go env |grep "GOROOT" |cut -d "=" -f2`
GOROOT=${GOROOT#\"}
GOROOT=${GOROOT%\"}
fi
echo $GOROOT go_pkg_src=$GOROOT/pkg find $go_pkg_src -name "*.go" -print > cscope.files
find . -name "*.go" -print >> cscope.files if cscope -b -k; then
echo "Done"
else
echo "Failed"
exit
fi

gopath.sh

 GOROOT=`go env |grep "GOROOT" |cut -d "=" -f2`
GOROOT=${GOROOT#\"}
GOROOT=${GOROOT%\"}
echo $GOROOT GOPATH=`go env |grep GOPATH |cut -d "=" -f `
GOPATH=${GOPATH%\"}
GOPATH=${GOPATH#\"}
echo $GOPATH
10 declare -x GOROOT
11 declare -x GOPATH
12 export PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin

linux command wrap的更多相关文章

  1. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

  2. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  3. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  4. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  5. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  6. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  7. 15 Examples To Master Linux Command Line History

    When you are using Linux command line frequently, using the history effectively can be a major produ ...

  8. 10 Interesting Linux Command Line Tricks and Tips Worth Knowing

    I passionately enjoy working with commands as they offer more control over a Linux system than GUIs( ...

  9. Reso | The Linux Command Line 的中文版

    http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...

随机推荐

  1. SQL Server2008 R2 数据库镜像实施手册(双机)SQL Server2014同样适用

    这篇文章主要介绍了SQL Server2008 R2 数据库镜像实施手册(双机)SQL Server2014同样适用,需要的朋友可以参考下 一.配置主备机 1. 服务器基本信息 主机名称为:HOST_ ...

  2. 数据库页已标记为 RestorePending,可能表明磁盘已损坏。要从此状态恢复,请执行还原操作。

    错误提示: 消息 829,级别 21,状态 1,第 1 行 数据库 ID 15,页 (1:21826) 已标记为 RestorePending,可能表明磁盘已损坏.要从此状态恢复,请执行还原操作. 引 ...

  3. python 格式化字符串"%s"%

    %s    字符串 (采用str()的显示) %r    字符串 (采用repr()的显示) %c    单个字符 %b    二进制整数 %d    十进制整数 %i    十进制整数 %o    ...

  4. winhex模版

    模版数据类型: char 字符 字符数组 char[i] binary  显示为二进制 hexadecimal uint32  显示4个字节,按16进制小端显示

  5. (已解决)cocos2d-x 运行时xcode提示错误:"vtable for XXX", referenced from;

    vtable/引用和虚函数相关,今天在添加一个层的时候报了这个错误,很低级的错误,忘了实现虚函数了(谨记!!) 若如果实现了虚函数还依然如此的话,可能是创建的时候忘了钩上 -desktop 选项了,把 ...

  6. 实时计算DStream下求平均值(reduceByKey or combineByKey)

    对NC市的卡口数据进行分析,大概所有卡口每15秒接入的有效数据在3000条左右,现在产品经理要求对这些数据进行拥堵分析,通过两个卡口之间的车辆行驶时长来判断道路的拥堵情况.具体算法不展开.其中我需要做 ...

  7. DW表格的简单应用 之(个人简历模板)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. animation 老动画

    关于设置跳跃: using System.Collections; using System.Collections.Generic; using UnityEngine; public class ...

  9. org.joda.time.DateTime 日期格式

    最近一直在使用Java,偶尔一次遇到日期(util)的格式转换,心里还是规矩的写着记忆里面的代码,但是在自己测试的时候发现不正确,具体看了下代码,发现这里使用jota的方式编写,顺道查了一下,做了笔记 ...

  10. linux文件目录管理命令

    1.touch命令 touch命令用于创建空白文件或设置文件的时间,格式为“touch [选项] [文件]”. touch test命令可以创建出一个名为test的空白文本文件  touch命令的参数 ...