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.
ファイルを読み取り、シェル スクリプトを使用して [0-9] など、数字で始まるすべてのテキスト行を削除する良い方法を知りたいです。前もって感謝します!
次のようなものを使用できます。
grep -v '^[0-9]' input-file > output-file
sed の使用:
sed '/^[0-9]/d' file > outfile
GNU sed がある場合は、元のファイル自体を更新できます。
sed -i '/^[0-9]/d' file