Afficher un message
Vieux 28/05/2007, 19h31   #4
tmp123
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Finding a string in a file

On May 28, 3:52 pm, apogeusiste...@gmail.com wrote:
> Hi:
> I need search a specified string in a file, after the word
> "mounting" , like this:
>
> solaris> cat file
> netbackup, orac_ux001 backup, streaming yes, multiplexing ok ,
> mounting M00541 police enabled, data file
>
> Which awk command can I issue to extract only the "M00541" string
> inside a file ?
>
> Thanks


Could this statement be useful?

expr "`grep mounting file`" : 'mounting *\(\w*\)'

Kind regards.


  Réponse avec citation
 
Page generated in 0,04580 seconds with 9 queries