
Shell
文章平均质量分 85
wzq2009
这个作者很懒,什么都没留下…
展开
-
终端显示git分支
Git branch in prompt.修改/etc/bashrc文件parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'}export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] ...原创 2020-02-18 11:15:24 · 300 阅读 · 0 评论 -
How to Configure Network Proxy Settings for OSX
Once the domain of Windows clients, more MacBooks and iMacs are finding their way onto small business and corporate networks. These networks typically funnel all Internet-bound traffic through a number of proxy servers.Any application that requires Inter原创 2021-04-05 10:54:36 · 581 阅读 · 0 评论 -
check and disable device
#!/bin/bashPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHdisk_info_file='../data/disk_info.dat'net_info_file='../data/net_info.dat'# 创建function init_disk(){ echo -n '' > ${disk_info_file}# 所有硬盘的列表 disklist=$原创 2020-06-28 18:31:46 · 349 阅读 · 0 评论 -
shell 命令中的特殊符号
組合按鍵組合按鍵執行結果Ctrl + C終止目前的命令Ctrl + D輸入結束 (EOF),例如郵件結束的時候;Ctrl + M就是 Enter 啦!Ctrl + S暫停螢幕的輸出Ctrl + Q恢復螢幕的輸出Ctrl + U在提示字元下,將整列命令刪除Ctrl + Z『暫停』目前的命令...原创 2020-06-17 15:16:32 · 184 阅读 · 1 评论 -
Read file line by line on a Bash Unix & Linux shell
https://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/How do I read a text file line by line under a Linux or UNIX-like system using KSH or BASH shell? How do I read a file line by line in bash script?SyntaxThe syntax is as follows for ba翻译 2020-06-24 22:03:22 · 367 阅读 · 0 评论