bash cheatsheet


ccd() {
    pp=$1
    pp='D:\app\iStyle_windows_x86_64'
    echo "$pp"
    re='(.*)\\+(.*)'
    while [[ $pp =~ $re ]]; do
        pp=${BASH_REMATCH[1]}/${BASH_REMATCH[2]}
        echo $pp
    done


    if [[ $pp =~ (.*):(.*) ]]
    then
        pp=${BASH_REMATCH[1]}${BASH_REMATCH[2]}
    fi


    pp=/mnt/${pp}
    echo "$pp"
    cd $pp
}


for (( ii=1; ii<9; ii++ )); do
    printf -v ss "%05d" $ii
    echo $ss
done

posted on 2024-09-12 00:48  yusisc  阅读(11)  评论(0编辑  收藏  举报

导航