拥有以下字符串:
$("#ergebniss"+i).load(link + "table:eq(0) td:eq(73)");
在以">"开头的行中,我想将数字移到前面,用旧文本的其余部分隔开一个空格,保留条目的属性,所以它看起来像这样:
>db|version.x|name of entry 1
properties of entry1
>db|version.x|name of entry 2
properties of entry2
答案 0 :(得分:0)
awk '{sub(/^>/, ">"$NF" ")}1' File
>1 db|version.x|name of entry 1
properties of entry1
>2 db|version.x|name of entry 2
properties of entry2