Answered Questions

  • CPU Utilization Time

    By using which command can you find the CPU utilization time?

    abdas

    • Jul 31st, 2011

    $ iostat
    tty 2/md300 2/md301 2/md302 2/md303 cpu
    tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
    0 4819 0 0 4 292 15 3 1 0 3 0 0 4 67 10 0 22

  • Extract 2 characters in file

    Hello,I want to extract 2 characters of the first column of the one file, that file has 19 columns, in bash script.the first column is some thing like this 2005-07-25, and I want to extract 07. I wrote this codeawk '{ print $ substr ($1,6, 2)}, but out put is he whole of the column: 2005-07-25! can you help me?

    vishal singh

    • May 8th, 2017

    Awk {print substr($1,1,2)} t1.txt t1.txt NAME AGE GENDER SANTOSH 23 Male ajay 24 Male vijay 24 male

    Code
    1.  

    apoorva

    • Apr 25th, 2017

    Awk -F "-" {print substr($2,0,2)} xdf.txt