随笔分类 - linux shell
摘要:1、测试数据 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt i 3 a d g x 8 6 k m x a a y n 2、awk实现 (1)、每一行后添加空行 root@PC1:/home/test2# ls a.tx
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt i u k f 2 3 8 7 s j 9 4 2、利用for循环转置 root@PC1:/home/test# ls a.txt root@PC1:/home/t
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt ## 测试数据 i u k f 2 3 8 7 s j 9 4 形式一、按行排列 2、xargs实现 root@PC1:/home/test# ls a.txt r
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt i u k f 2 3 8 7 s j 9 4 2、形式1(按照行进行排列) root@PC1:/home/test# ls a.txt root@PC1:/hom
阅读全文
摘要:1、生成测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt ## 测试数据 1 2 3 4 5 2、xargs实现 root@PC1:/home/test# ls a.txt root@PC1:/home/test# c
阅读全文
摘要:1、测试文件 root@PC1:/home/test3# ls root@PC1:/home/test3# touch a.txt b.txt ## 测试文件 root@PC1:/home/test3# ls a.txt b.txt root@PC1:/home/test3# lsattr a.tx
阅读全文
摘要:1、测试文件 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt >1 e r >2 s d >3 i j >4 z c >5 a t >6 e d >7 3 7 >8 z d >9 a c >10 t a >11 a c 2、删
阅读全文
摘要:1、测试文件及路径 root@PC1:/home/test# ls a.txt gwas.bed test1 test2 root@PC1:/home/test# pwd /home/test root@PC1:/home/test# ll -h total 24K drwxr-xr-x 4 roo
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls record.txt test.fa root@PC1:/home/test# cat test.fa >OR4F29_ENSG00000284733_ENST00000426406_20_955_995 AGCCCAGTTGGCTGGA
阅读全文
摘要:1、一般情况提取连续行 测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt >1 01 02 >2 03 04 >3 05 06 >4 07 08 >5 09 10 >6 11 12 >7 13 14 >
阅读全文
摘要:1、查看内核、系统版本 [root@virtualboxcentos7 test]# hostnamectl Static hostname: virtualboxcentos7 Icon name: computer-vm Chassis: vm Machine ID: e8d08b54fc552
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt 2 3 5 d a d g v k z c d e q w r i j m n x z v d f g h 2、转换为3列数据 root@PC1:/home/tes
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 a 3 5 d s g e z 2、sed 实现 root@PC1:/home/test2# ls test.txt root@PC
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt a 3 5 d s g e z root@PC1:/home/test2# cat -A test.txt a 3 5 d$ s g e z$ 2、
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 a 3 5 d s g e z c g w k z c m d 2、xargs实现(数据大时不适用) root@PC1:/home/
阅读全文
摘要:1、取正对角线 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt 1 D E 2 s d 3 d c root@PC1:/home/test# awk '{print $NR}' a.txt ## 取矩阵对角线元素,正对角线 1
阅读全文
摘要:1、 root@PC1:/home/test2# ls a.txt dir.1 test.csv test.ped root@PC1:/home/test2# ls -l total 8 -rw-r--r-- 1 root root 64 1月 21 23:14 a.txt drwxr-xr-x 2
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt ## 测试数据 chenwu 05/99 4811 27 mary 02/22 1231 30 tom 09/15 1182 25 2、 root@PC1:/h
阅读全文
摘要:1、测试数据 root@PC1:/home/test# ls ## 测试数据 a.txt b.txt root@PC1:/home/test# cat a.txt w s g d w a root@PC1:/home/test# cat b.txt d a e d t c 2、取两个文件的交集 so
阅读全文

浙公网安备 33010602011771号