Usando sed
:
sed 's/^\( *\)title=\(.*\),/title={\textbf},/' in
Para editar o arquivo no local em vez de imprimir o arquivo editado em stdout
, adicione a opção -i
:
sed -i 's/^\( *\)title=\(.*\),/title={\textbf},/' in
-
\( *\)
: corresponde e agrupa qualquer número decaracteres no início da linha;
-
title=
: corresponde a uma string^title=
; -
\(.*\),
: corresponde e agrupa qualquer número de qualquer caractere antes de um caractere,
avidamente e um caractere,
; -
title={\textbf},
: substitui a correspondência por uma stringtitle={\textbf
seguida pelo grupo capturado seguido por uma string},
;
% cat in
@inproceedings{lechartier2014static,
title={Static and Dynamic Modeling of a PEMFC for Prognostics Purpose},
author={Lechartier, Elodie and Gouriveau, Rafael and Pera, Marie-Cecile and Hissel, Daniel and Zerhouni, Noureddine},
booktitle={Vehicle Power and Propulsion Conference (VPPC), 2014 IEEE},
pages={1--5},
year={2014},
organization={IEEE}
}
@inproceedings{zein2013statistical,
title={Statistical approach to online prognostics of turbine engine components},
author={Zein-Sabatto, Saleh and Bodruzzaman, Jabir and Mikhail, Mervat},
booktitle={Southeastcon, 2013 Proceedings of IEEE},
pages={1--6},
year={2013},
organization={IEEE}
}
% sed 's/^\( *\)title=\(.*\),/title={\textbf},/' in
@inproceedings{lechartier2014static,
title={\textbf{Static and Dynamic Modeling of a PEMFC for Prognostics Purpose}},
author={Lechartier, Elodie and Gouriveau, Rafael and Pera, Marie-Cecile and Hissel, Daniel and Zerhouni, Noureddine},
booktitle={Vehicle Power and Propulsion Conference (VPPC), 2014 IEEE},
pages={1--5},
year={2014},
organization={IEEE}
}
@inproceedings{zein2013statistical,
title={\textbf{Statistical approach to online prognostics of turbine engine components}},
author={Zein-Sabatto, Saleh and Bodruzzaman, Jabir and Mikhail, Mervat},
booktitle={Southeastcon, 2013 Proceedings of IEEE},
pages={1--6},
year={2013},
organization={IEEE}
}