拷贝文件增加序号
Last active
April 11, 2018 05:37
-
-
Save BUNotesAI/297316c0fac98ca1c7de9c6b1e683d55 to your computer and use it in GitHub Desktop.
拷贝文件增加序号
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| awk '{print NR "," $0}' yuliaoku.txt > yuliaoku2.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat 1.txt | clj -e '(->> (repeatedly #(read-line)) (take-while some?) (map-indexed #(str %1 "," %2)) (clojure.string/join \newline) print)' > 1_out.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment