SHARE
TWEET

Untitled

a guest Jan 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. declare -A tab
  3. tab ["Ala"] = "ma kota"
  4. echo ${tab["Ala"]} -wypisze pojedyncze słowa w petli ; echo ${!tab["Ala"]} - wypisze całe zdania (klucze)
  5. for i in ${tab[*]}
  6. do
  7.     echo key=$i ,value =${tab[$i]}
  8. done
  9. ------------------
  10. decaler -A tab
  11. x=$(ps -eo ...)
  12. while read user pid mem cpu
  13. do
  14.     let "tab[$user]++"
  15. done <<<"${x}"
  16. for i in ${!tab[*]}
  17. do
  18.     printf "..." $i ${tab[*]} ....(dwie tablice)
  19. done | sort -k2 -n
  20. awk tez ma tablice asocjacyjną
  21. bc - jest do matmy
  22.  
  23. ps -eo user,uid,pmem,cpu,comm | awk '{ile[$1]++}END{for (i in ile) printf "%10 %5d\n",i,ile[i] }' tablice  w awk są wypelnione zerami
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top