Hi guys i have a question??I want to move column in another file and match with rows and column and put in exact position.
投入文件1是:
COURSE NAME: Java CREDITS: 4 200345 88 300126 78 287136 68 200138 71 COURSE NAME: Operating System CREDITS: 4 287136 86 200138 72 200345 77 300056 78
投入文件2是:
STUDENT ID Java Operating System GPA 200138 200345 287136 300056 300126
需要产出:
STUDENT ID Java Operating System GPA 200138 71 72 200345 88 77 287136 68 86 300056 - 78 300126 78 -
我在谈到这一法典:
awk NR==FNR{a[$1]=$2;next} {print $0 FS a [$1];next} file1 file2
其产出如下:
STUDENT ID JAVA Operating Systems GPA 200138 72 200345 77 287136 86 300056 78 300126 78
I tried alot:( Can you please help me?