随笔分类 -  shell

misc shell script
摘要:【Purpose】 Shell script check requires root privileges 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: #!/bin/bash if [[ $EUID != 0 ]]; th 阅读全文
posted @ 2019-12-18 11:20 嵌入式实操 阅读(534) 评论(0) 推荐(0)
摘要:【Purpose】 Shell script check host dependent pkg 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: dependent_pkg="gitk" for pkg in $dependen 阅读全文
posted @ 2019-12-09 20:11 嵌入式实操 阅读(140) 评论(0) 推荐(0)
摘要:【Purpose】 Shell script monitor prog function 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: #!/bin/bash while [ 1 ] do # get under /appS 阅读全文
posted @ 2019-11-28 18:37 嵌入式实操 阅读(187) 评论(0) 推荐(0)
摘要:first : add follow context in /etc/vim/vimrc set ignorecaseset cursorlineset autoindentautocmd BufNewFile *.sh exec ":call SetTitle()"func SetTitle() 阅读全文
posted @ 2019-03-28 14:13 嵌入式实操 阅读(166) 评论(0) 推荐(0)
摘要:【Purpose】 Shell print function base on err info wrn ext output level 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: #!/bin/bashDEST=/tmp 阅读全文
posted @ 2019-02-18 11:15 嵌入式实操 阅读(253) 评论(0) 推荐(0)
摘要:Shell script prompt to run with superuser privileges 【Purpose】 Check whether have root privileges to run script 【Eevironment】 Ubuntu 16.04 bash env 【P 阅读全文
posted @ 2019-01-24 14:15 嵌入式实操 阅读(339) 评论(0) 推荐(0)
摘要:Shell get script absolute path 【Purpose】 Get shell script absolute path 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: Test method: vmus 阅读全文
posted @ 2019-01-24 14:11 嵌入式实操 阅读(213) 评论(0) 推荐(0)
摘要:Shell args handing key=value example 【Purpose】 Learning how to handing ker=value args 【Eevironment】 Ubuntu 16.04 bash env 【Procdeure】 Source code: Tes 阅读全文
posted @ 2019-01-24 14:05 嵌入式实操 阅读(210) 评论(0) 推荐(0)
摘要:Shell built-in variables 【Purpose】 Learning shell built-in variables, example $0,$1,$2,$3,$#,$$,$*,$@,$-,$? 【Eevironment】 Ubuntu 16.04 bash env 【Procd 阅读全文
posted @ 2019-01-24 13:41 嵌入式实操 阅读(259) 评论(0) 推荐(0)