.bashrc介绍一、.bashrc 是什么?二、.bashrc 能干什么?三、.bashrc 怎么用?四、.bashrc 没了怎么办?参考资料 一、.bashrc 是什么?.bashrc是home目录下的一个shell文件,用于储存用户的个性化设置。在bash每次启动时都会加载.bashrc文件中的内容,并根据内容定制当前bash的配置和环境。补充: .bash_profile和.bashrc
bash的字符串处理工具:字符串切片:${#var}:返回字符串变量var的长度[root@localhost ~]# num=123456789
[root@localhost ~]# echo ${#num}
9${var:offset}:返回字符串变量var中从第offset个字符后(不包括第offset个字符)的字符开始,到最
原创
2016-08-24 21:31:03
715阅读
bash的文本搜索工具 grep和egrep: 首先为大家介绍grep的使用方式 Grep的使用有两种格式:(如下) 1.grep [OPTIONS] PATTERN [FI
原创
2014-11-21 22:27:40
557阅读
点赞
本文转载至:http://www.arachnoid.com/linux/beautify_bash/IntroductionI wrote a Ruby beautifier script a few years ago and it has become very popular. I decided to rework it to beautify Bash script
转载
2023-05-05 14:14:53
122阅读
bash命令参数:(sh是bash命令的链接)
-n 只读取shell脚本,但不实际执行
-x 进入跟踪方式,显示所执行的每一条命令
-c "string" 从strings中读取命令
“-n”可用于测试shell脚本是否存在语法错误,但不会实际执行命令。在shell脚本编写完成之后,实际执行之前,首先使用“-n&rd
转载
2011-01-27 15:35:15
1058阅读
回顾: RAID: 不同的服务器配置起来他的借口可能配置起来有所不同,但是官方一般都提供
原创
2016-11-21 17:24:35
704阅读
写了一个Bash小工具,想发博客的,发到论坛里去了,把它引用到这里。http://bbs.51cto.com/thread-1077779-1.html
原创
2013-10-17 19:55:08
532阅读
实现二叉树到对应镜像的转化算法如下: void exchangeBTree(BTRee *root) { BTRee *t; if(root) { t=root->rChild; root->rChild=root->lChild; root->lChild=t; exchangeBTree(root->lChild); exchangeBTree(root->
转载
2024-07-29 15:50:45
56阅读
最简单的例子 —— Hello World!几乎所有的讲解编程的书给读者的第一个例子都是 Hello World 程序,那么我们今天也就从这个例子出发,来逐步了解 BASH。用 vi 编辑器编辑一个 hello 文件如下:#!/bin/bash# This is a very simple exampleecho Hello World这样最简单的一个 BASH 程序就编写完了。这里有
转载
精选
2008-07-29 10:44:19
4675阅读
系统应该是Alpine Linux LXD(Linux容器),那么入股在其中安装 bash shell呢apk updateapk upgradeapk add bash# 安装 bash 文档apk add bash-doc# 安装 bash 自动命令补全apk add bash-completion# 使用 bash 作为 shellbash# 需要从主机登录到 Alpine Linux LXD 虚拟机,比如我从kubernets进去kubectl exec -it .
原创
2021-06-17 12:25:10
2639阅读
系统应该是Alpine Linux LXD(Linux容器),那么入股在其中安装 bash shell呢apk updateapk upgradeapk add bash# 安装 bash 文档apk add bash-doc# 安装 bash 自动命令补全apk add bash-completion# 使用 bash 作为
原创
2022-03-10 10:33:40
1798阅读
全栈工程师开发手册 (作者:栾鹏) 架构系列文章curlcurl -h来查看请求参数的含义 -v 显示请求的信息 -X 选项指定其它协议get: curl -v 192.168.33.1:8080/girls/age/18post: curl -v 192.168.33.1:8080/girls -d 'age=14&cupSize=C' curl -v -X P
原创
2022-03-27 16:43:54
218阅读
CTRL 键相关的快捷键:
Ctrl + w - 删除最后输入的单词
Ctrl + a
Ctrl + e
Ctrl + b
Ctrl + f
Ctrl + d
Ctrl + h
Ctrl + u
Ctrl + k
Ctrl + r
Ctrl + l
Ctrl + c
Ctrl + z, jobs, bg, fg
ALT 键相关的快捷键:
平
转载
精选
2011-05-27 18:16:20
768阅读
CentOS6yum update bash--Version bash-4.1.2-15.el6_5.2.x86_64CentOS5 x86-64wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5_10.4.x86_64.rpm && rpm -
原创
2014-09-28 08:40:25
1228阅读
Bash脚本基础 BASH = GNU Bourne-Again Shell,BASH 是 GNU 组织开发和推广的一个项目。Bash脚本类似批处理,简单来讲就是把许多的指令集合在一起,并提供循
原创
2017-06-15 20:32:16
590阅读
bash中命令介绍
原创
2017-10-27 18:02:51
590阅读
Bash shell 的算术运算有四种方式:1:使用 expr 外部程式加法 r=`expr 4 + 5`echo $r注意! '4' '+' '5' 这三者之间要有空白r=`expr 4 * 5` #错误乘法 r=`expr 4 \* 5`2:使用 $(( ))r=$(( 4 + 5 ))echo...
转载
2014-04-17 17:15:00
227阅读
bash n xxx.sh 检查脚本的语法格式, bash x xxxx.sh 显示脚本的执行顺序
转载
2019-10-22 08:20:00
589阅读
2评论
Knowing how conditionals work in bash open up a world of scripting possibilities. We’ll learn the basic syntax, including if, else, and elif. Then we'
转载
2021-02-09 03:04:00
606阅读
2评论
Every command in bash returns an exit status, which is an integer between 0 and 255 that represents whether the command succeeded or failed, and if it
转载
2021-02-08 21:39:00
386阅读
2评论