我有两个文件。他们中的一个定义了一组数 - 值对如下(的fileA):用另一个文件中的值替换文件中的字符串
1 asm
2 assert
3 bio
4 bootasm
5 bootmain
6 buf
7 cat
8 console
9 defs
10 echo
其他文件包含一堆值配对,如下(FILEB):
bio types
bio defs
bio param
bio spinlock
bio buf
bootasm asm
bootasm memlayout
bootasm mmu
bootmain types
bootmain elf
bootmain x86
bootmain memlayout
cat types
cat stat
cat user
我想编写一个脚本,用文件A中的相应编号替换文件B上的值。 生成新文件或更改现有文件B无关紧要。
任何想法? 由于