learning shell display alert function】的更多相关文章

[Purpose]        Shell print function base on err info wrn ext output level   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code: #!/bin/bash DEST=/tmp mkdir -p /tmp/debug display_alert() #-------------------------------------------…
[Purpose]        Shell script monitor prog function   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code: #!/bin/bash while [ 1 ] do # get under /appServer/app directory prog numbers nprogs=`ls -t /appServer/app | cut -d" " -f1…
不知道哪里alert undefined 用下面的语句是js报错.F12能提示报错的地方 var oldalert=window.alert; window.alert=function(aa){ if (typeof (aa)=="undefined"){  throw "就是这";}else{oldalert(aa)}}; 这样浏览器会报错...就能定位到错误位置了.…
Shell built-in variables [Purpose]        Learning shell built-in variables, example $0,$1,$2,$3,$#,$$,$*,$@,$-,$?   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code: #!/bin/bash echo "shell args option" echo "script nam…
how to disabled alert function in javascript alert 阻塞主线程 default alert; // ƒ alert() { [native code] } alert(`1`); OK alert(`1`); // alert: 1 // true alert; // ƒ (n){try{console.log("alert: "+n)}catch(t){}return!0} window.alert = function(n){ tr…
Shell args handing key=value example [Purpose]        Learning how to handing ker=value args   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure]        Source code: # Script parameters handling get left parameters and right value for i in "$@&…
Shell script prompt to run with superuser privileges [Purpose]        Check whether have root privileges to run script   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code: #!/bin/bash ]]; then echo "This script requires root privil…
Shell get script absolute path [Purpose]        Get shell script absolute path   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code: #!/bin/bash echo "$(dirname "$(realpath "${BASH_SOURCE}")")" echo "$(…
[Purpose]        Shell script check requires root privileges   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code:  #!/bin/bash ]]; then echo "This script requires root privileges, trying to use sudo" sudo "test.sh" &…
[Purpose]        Shell script check host dependent pkg   [Eevironment]        Ubuntu 16.04 bash env   [Procdeure] Source code:  dependent_pkg="gitk" for pkg in $dependent_pkg; do if ! dpkg-query -l $pkg | grep -q ii; then echo installing $pkg ..…