zoukankan      html  css  js  c++  java
  • Linux command line and shell scripting buble

    Chapter 4 More bash shell Commands

    1. ps

    ps -ef

    2. top

    3. kill 3940

    kill -s HUP 3940

    killall http*

    4. df

    df -h

    5. du

    du -h

    6. sort

    sort -n 

    sort -r

    sort -t ":" -k 3 -n

    7. grep

    grep three file1

    grep -v

    grep -n

    grep -c 

    8. tar

    tar -cvf test.tar test1/ test2/

    tar -xvf test.tar

    tar -tf test.tar

    Chapter 6: Using Linux Environment Variables

    $mytest=(one two three four five)

    $ echo ${mytest[1]}

    $ echo ${mytest[*]}

    $ mytest[2]=seven

    $ unset mytest[2]

    $ unset mytest

    Chapter11: Basic Script Building

    echo -n

    testing=`date`

    testing=$(date)

    date +%y%m%d

    $ wc << EOF

    > test string1

    > test string2

    > EOF

    $ expr 2 + 3

    $ expr 2 * 3

    $var1=$[1+4]

    $var1=$(echo "scale=4;3.44/5" | bc)

    var5=$(bc << EOF
    scale=4
    a1 = ($var1 * $var2)
    b1 = ($var3 * $var4)
    a1 + b1
    EOF
    )

  • 相关阅读:
    Java程序设计作业02
    Java程序设计作业01
    DS博客作业05
    DS博客作业04
    DS博客作业03
    DS博客作业02
    DS博客作业01
    C博客作业06
    C博客作业05
    C语言——数组作业批改
  • 原文地址:https://www.cnblogs.com/NewMan13/p/11235296.html
Copyright © 2011-2022 走看看