Linux 命令详解:head、sed、tr 和重定向
-
head -n1 /home/liulanzhou/metagenome/lss/humann2result/pathabundance.tsv: 该命令读取指定路径/home/liulanzhou/metagenome/lss/humann2result/下的pathabundance.tsv文件的第一行,并将内容显示在终端。 -
sed 's/# Pathway/SampleID/': 该命令使用sed工具将前一个命令的输出中所有# Pathway字符串替换为SampleID。 -
tr '\t' '\n': 该命令使用tr工具将前一个命令的输出中所有制表符 (\t) 替换为换行符 (\n)。 -
> /home/liulanzhou/metagenome/lss/humann2result/diffgroups/header: 该命令将前一个命令修改后的输出重定向到指定路径/home/liulanzhou/metagenome/lss/humann2result/diffgroups/下名为header的文件中。
原文地址: https://www.cveoy.top/t/topic/o6l7 著作权归作者所有。请勿转载和采集!