linux vi paste,linux shell命令之paste

这篇博客介绍了如何使用Linux shell命令`paste`进行文件内容的合并,并展示了不同参数下的用法示例,如按行粘贴、指定域分隔符等。内容涉及多所大学名称和城市,以及一些技术文件名,如`findphone.awk`和`mysql_test.c`等。
摘要由CSDN通过智能技术生成

vi FILE1

Shanghai Jiaotong University

University of Toronto

Beijing University

Southest University

Victory University

vi FILE2

Shanghai

Toronto

Beijing

Nanjing

MelBourne

paste FILE1 FILE2

Shanghai Jiaotong University Shanghai

University of Toronto Toronto

Beijing University Beijing

Southest University Nanjing

Victory University MelBourne

paste FILE2 FILE1

Shanghai Shanghai Jiaotong University

Toronto University of Toronto

Beijing Beijing University

Nanjing Southest University

MelBourne Victory University

paste -d: FILE1 FILE2 :为域的分隔符

Shanghai Jiaotong University:Shanghai

University of Toronto:Toronto

Beijing University:Beijing

Southest University:Nanjing

Victory University:MelBourne

paste -d@ FILE1 FILE2 @为域的分隔符

Shanghai Jiaotong University@Shanghai

University of Toronto@Toronto

Beijing University@Beijing

Southest University@Nanjing

Victory University@MelBourne

paste -d: -s FILE1 FILE2 #-s按行粘贴,将file1的文件放到同一行,将file2的文件放到同一行

Shanghai Jiaotong University:University of Toronto:Beijing University:Southest University:Victory University

Shanghai:Toronto:Beijing:Nanjing:MelBourne

ls | paste -d" " - - - - #粘贴行每行显示4个文件

a.out append.sed AREACODE.db argv.awk

CARGO3.db count_word.sh FILE1 FILE2

findphone.awk insert.sed MapClearTest.class MapClearTest.java

modify.sed mysql_test.c output pass.awk

PROFESSOR.db scr2.awk scr.awk sever.c

sever.o sever.s sturecord TEACHER1.db

TEACHER.db TEACHER_HOBBY.db test1.c test1.cpp

test.c testNet.c test_sockpair test_sockpair.c

timer1 timer1.c timer2 timer2.c

timer3 timer3.cpp traverseFile traverseFile.c

WORDLIST

标签:Toronto,Beijing,FILE1,shell,FILE2,University,Shanghai,linux,paste

来源: https://www.cnblogs.com/zhudaheng123/p/14519987.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值