[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Et kommandofortolkerspørgsmål (Was: Et awk spørgsmål)



Frank Nørvig skrev:

> Jeg fyrer følgende kommando af for at få en liste over
> filnavne hvor "java 1.3" indgår:
> 
> grep -i "java" * | grep -i "1\.3" | awk -F : '{ print $1; }'
> 
> Men hvis jeg nu vil viderebehandle filnavnet, f.eks. fyre
> en ny grep af, hvordan gør jeg så det? Kan jeg pipe videre
> ud i en ny grep?

Ja, du kan godt viderekanalisere uddata fra `awk`; ganske
som du kan fra alle andre programmer der skriver til
"stdout".  Men i dette tilfælde er det lidt at skyde
gråspurve med kanoner at bruge `awk`.  `cut -d: -f1` gør det
samme som `awk -F : '{ print $1; }'`, og formodentlig endda
hurtigere.

Jacob
-- 
I teorien lyver folk ikke i retten.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *