随笔分类 -  linux shell

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 77 下一页
摘要:001、 'gmake'特指GNU make。 'make'是指系统默认的make实现;在大多数Linux发行版中,这是GNU make,但是在其他unix中,它可以指代make的某些其他实现,例如BSD make或各种商业unix的make实现。 GNU make接受的语言是传统make实用程序支 阅读全文
posted @ 2023-10-10 16:15 小鲨鱼2018 阅读(1026) 评论(0) 推荐(1)
摘要:001、问题:Failed to find "GL/gl.h" in 002、解决方法 [root@pc1 cmake-3.27.7-build]# yum install mesa-lib* 。 参考:https://www.jianshu.com/p/5eeb3dd51c08 阅读全文
posted @ 2023-10-10 15:47 小鲨鱼2018 阅读(633) 评论(0) 推荐(0)
摘要:001、从左侧删除,# 和 *. a、从左侧删除单个 [root@pc1 test01]# var=GCF_000001735.4_TAIR10.1_genomic.fna ## 测试字符串 [root@pc1 test01]# echo ${var#*.} ## 从左侧删除第一个.后之前的,使用的 阅读全文
posted @ 2023-10-10 11:21 小鲨鱼2018 阅读(35) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test01]# ls a.txt [root@pc1 test01]# cat a.txt ## 测试数据 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 阅读全文
posted @ 2023-10-10 11:04 小鲨鱼2018 阅读(446) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test01]# ls a.txt [root@pc1 test01]# cat a.txt ## 测试数据 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 阅读全文
posted @ 2023-10-10 10:55 小鲨鱼2018 阅读(336) 评论(0) 推荐(0)
摘要:001、方法1 利用cut [root@pc1 test01]# ls a.txt [root@pc1 test01]# cat a.txt ## 测试数据 001.002.003.004.005 006.007.008.009.010 011.012.013.014.015 016.017.018 阅读全文
posted @ 2023-10-10 10:29 小鲨鱼2018 阅读(246) 评论(0) 推荐(0)
摘要:. switch 构造是 Linux bash 脚本提供的另一个强大功能。(c语言?) 它可以用于需要嵌套条件的地方,但不希望使用复杂的 if-else elif 链。 001、 阅读全文
posted @ 2023-10-08 23:51 小鲨鱼2018 阅读(82) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test01]# ls a.sh [root@pc1 test01]# cat a.sh ## 测试脚本 #!/bin/bash : " ## 冒号和双引号之间有一个空格(也可以是单引号) xxxxxxx yyyyyyyyyyy ## 注释内容 zzzzzzzz " ( 阅读全文
posted @ 2023-10-08 23:04 小鲨鱼2018 阅读(653) 评论(0) 推荐(0)
摘要:001、 -s file:文件存在而且文件不为空,则为真,否则为假 (base) [root@pc1 test01]# ls a.txt b.txt (base) [root@pc1 test01]# ll -h ## 两个侧式文件,a.txt不为空,b.txt则为空 total 4.0K -rw- 阅读全文
posted @ 2023-10-06 19:44 小鲨鱼2018 阅读(1137) 评论(0) 推荐(0)
摘要:001、 a.txt [root@pc1 test01]# cat a.txt ## 测试数据 40 60 20 40 40 80 60 20 20 89 ## 每隔3行, 打上标签 [root@pc1 test01]# awk 'BEGIN{a=1}{if(sum <= 3) {print "ta 阅读全文
posted @ 2023-10-06 10:54 小鲨鱼2018 阅读(49) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test01]# ls a.txt [root@pc1 test01]# cat a.txt ## 测试数据 40 60 20 40 40 80 60 20 20 0 0 80 4 4 8 8 ## 每隔4行输出平均值 [root@pc1 test01]# awk '{ 阅读全文
posted @ 2023-10-06 10:45 小鲨鱼2018 阅读(87) 评论(0) 推荐(0)
摘要:001、问题,centos7中中用户名和主机名消失,显示-bash-4.2,如下: -bash-4.2$ 002、产生原因 配置文件丢失或意外删除。 003、解决方法1 -bash-4.2$ echo "export PS1='[\u@\h \W]\$'" >> ~/.bash_profile -b 阅读全文
posted @ 2023-10-05 14:00 小鲨鱼2018 阅读(796) 评论(1) 推荐(0)
摘要:001、 创建两个测试用户 [root@pc1 home]# ls [root@pc1 home]# useradd user01 ## 创建两个测试用户 [root@pc1 home]# useradd user02 [root@pc1 home]# echo tmppasswd | passwd 阅读全文
posted @ 2023-10-04 16:33 小鲨鱼2018 阅读(562) 评论(0) 推荐(0)
摘要:001、 (base) [root@pc1 test]# ls (base) [root@pc1 test]# echo $a ## 测试变量a和b (base) [root@pc1 test]# echo $b (base) [root@pc1 test]# export a=10000 ## a 阅读全文
posted @ 2023-10-02 00:01 小鲨鱼2018 阅读(19) 评论(0) 推荐(0)
摘要:001、tr -dc string: 表示删除字符以外(补集complement)的所有字符 [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试文本 01 02 abd ef 03jkk. 04, f 05 f 06 [root@pc 阅读全文
posted @ 2023-10-01 23:16 小鲨鱼2018 阅读(375) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test]# ls ## 测试文件 a.txt b.txt [root@pc1 test]# ll -h total 110M -rw-r--r--. 1 root root 10M Oct 1 22:13 a.txt -rw-r--r--. 1 root root 1 阅读全文
posted @ 2023-10-01 22:25 小鲨鱼2018 阅读(58) 评论(0) 推荐(0)
摘要:001、tr实现 a、 [root@pc1 test02]# ls a.txt [root@pc1 test02]# cat a.txt ## 测试文件 01 02 03 04 05 06 07 08 09 10 [root@pc1 test02]# cat a.txt | tr "\n" " " 阅读全文
posted @ 2023-09-30 21:50 小鲨鱼2018 阅读(914) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test]# echo -n ! | od -A n -t u1 ## 将ASCII码感叹号转换为十进制数值 33 002、 [root@pc1 test]# echo -n ! | od -A n ## 将ASCII感叹号转换为8进制数值 000041 003、 [r 阅读全文
posted @ 2023-09-30 20:52 小鲨鱼2018 阅读(204) 评论(0) 推荐(0)
摘要:001、磁盘占用 (base) [root@pc1 test1]# ls test1 test2 test3 (base) [root@pc1 test1]# find $PWD -type d ## 查出所有目录 /home/test1 /home/test1/test1 /home/test1/ 阅读全文
posted @ 2023-09-27 21:55 小鲨鱼2018 阅读(53) 评论(0) 推荐(0)
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt batch01 xyz1 batch02 xyz2 batch03 xyz3 batch04 xyz4 batch05 xyz5 [root@pc1 test2]# awk '{s 阅读全文
posted @ 2023-09-27 09:03 小鲨鱼2018 阅读(411) 评论(0) 推荐(0)

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 77 下一页