Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
98行の.txtファイルがあります。各行の最初の14文字だけになるように、これらの各行を短くする必要があります。どうすればこれを行うことができますか?
Linuxの場合:
cut -c -14 myfile.txt > mycutfile.txt
これは、元のファイルの各行の最初の14文字(-14のショートカット)を取得して、それらを新しいファイルにパイプすることです。1-14
-14
1-14
colrm 15 < foo.txt
見栄えが良く、あなたが望むことをするかもしれません。
結果を保存する場合は、出力を別のファイルに転送する必要があります。