zoukankan      html  css  js  c++  java
  • bincp复制命名脚本

    #!/bin/bash
    declare -i DebugLevel=0
    Target=/mnt/sysroot
    [ -d $Target ] || mkdir $Target &>/dev/null
    read -p "A command:" Command
    while [ $Command != 'q' -a $Command != 'Q' ] ; do
    Command=`which $Command | grep -v "^alias" | grep -o "[^[:space:]]*"`
    [ $DebugLevel -eq 1 ] && echo $Command

    ComDir=${Command%/*}
    [ $DebugLevel -eq 1 ] && echo $ComDir
    [ -d ${Target}${ComDir} ] || mkdir -p ${Target}${ComDir}
    [ ! -f ${Target}${Command} ] && cp $Command ${Target}${Command} && echo "Copy $Command to $Target finished."
    for Lib in `ldd $Command | grep -o "[^[:space:]]*/lib[^[:space:]]*"` ; do
    LibDir=${Lib%/*}
    [ $DebugLevel -eq 1 ] && echo $LibDir

    [ -d ${Target}S{LibDir} ] || mkdir -p ${Target}${LibDir}
    [ ! -f ${Target}${Lib} ] && cp $Lib ${Target}${Lib} && echo "Copy $Lib to $Target finished."
    done
    read -p "A command: " Command
    done

  • 相关阅读:
    洛朗级数
    泰勒级数
    中心极限定理
    置信区间公式
    简单随机样本的性质
    极大似然估计
    矩估计法
    摆摊70
    天天去哪吃
    天天和树
  • 原文地址:https://www.cnblogs.com/bpsanshao/p/11283373.html
Copyright © 2011-2022 走看看