zoukankan      html  css  js  c++  java
  • Create Shortcut to Get Jar File Meta Information

    You have to get meta information of cobertura.jar with command "unzip -q -c cobertura.jar META-INF/MANIFEST.MF". It's too long to write so we gonna create a shortcut "getmeta" for this command. Then we can use "getmeta cobertura" to get the same information.

    In zsh, you can add following snippet into .zshrc:

    getmeta() { unzip -q -c "$*".jar META-INF/MANIFEST.MF }

    You can also use command "alias" to define this. But it's not general like above.

    In bash, add the following snippet to .bashrc or .bash_profile:

    getmeta() { unzip -q -c "$@".jar META-INF/MANIFEST.MF }

    Ref:

    http://stackoverflow.com/questions/2904677/alias-with-parameters

    http://stackoverflow.com/questions/4060880/shell-bash-passing-argument-to-alias

  • 相关阅读:
    统计代码行数
    梯度下降算法
    multiplot 安装与配置
    ros 源码安装
    cmake 指定gcc/g++版本
    python 科学计算基础库安装
    协方差矩阵的含义
    pysvn 相关
    void 0与undefined
    BEM规范
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3606779.html
Copyright © 2011-2022 走看看