随笔分类 -  shell

关于shell的使用笔记
【shell基础】Linux Shell 的“>/dev/null 2>&1” 详解
摘要:>/dev/null 2>&1 的含义:将标准输出和错误输出全部重定向到/dev/null中,也就是将产生的所有信息丢弃。 详细分析下: 符号 > 等价于 1> (系统默认为1,省略了先); 所以">/dev/null"等同于 "1>/dev/null"/dev/null 表示空设备文件0 表示st 阅读全文

posted @ 2023-02-14 18:28 鹅要长大 阅读(849) 评论(0) 推荐(0) 编辑

【shell基础】判断目录是否为空
摘要:前言 博主遇到一个问题,想要先判断某个目录是否为空,如果为空的话,需要安装camera驱动;如果不为空的话,可以继续运行程序; shell if [ "`ls -A /dev/video*`" = "" ]; then echo "/dev/video* is empty, install came 阅读全文

posted @ 2022-07-25 18:34 鹅要长大 阅读(1213) 评论(0) 推荐(0) 编辑

【shell基础】shell常用基础语句-替换后缀名复制同名文件
摘要:script # copy images with same name as json file to one directory dir=/home/xxx/output_tfl_20220630 mkdir dir/imageforfileindir/*.json; do # ech 阅读全文

posted @ 2022-07-06 13:02 鹅要长大 阅读(521) 评论(0) 推荐(0) 编辑

【shell基础】shell块注释
摘要:method1: ' contents to be comment. ' method2 <<eof content to be comment. eof method3 <<! content to be comment. ! 阅读全文

posted @ 2020-09-17 11:33 鹅要长大 阅读(351) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示