次のようなファイルがあります。
exit;
exit_cool
int exit =30
exitstatus;
exit ;
exit;
some exit;
coolexit;
this line should not be removed.
exitexit;
「exit;」のみを含む行を削除したい このファイルから.だから私はコマンドがファイルから最初の行だけを削除したい.私は現在このコマンドを使用しています:
type somefile.txt | find /v "exit;"
しかし、私が得ている出力は次のとおりです。
exit_cool
int exit =30
exitstatus;
exit ;
this line should not be removed.
あなたが見たように、コマンドは を含むすべての行をexit;
削除しました.1行目だけが完全に一致するので削除したい.何か助けはありますか?