[haiku-es] Re: [haiku-es] Re: Duda con Scripts, ventanas y presentación

  • From: Oliver Ruiz Dorantes <oliver.ruiz.dorantes@xxxxxxxxx>
  • To: haiku-es@xxxxxxxxxxxxx
  • Date: Fri, 6 Mar 2009 17:37:20 +0100

El programa que mencioné guarda un archivo con la siguente salida:
>
> /boot/home; .bash_history; ; 600 bytes;
> /boot/home; Desktop; Folder; 2.00 KB;
> /boot/home; Readme.txt; Text File; 187 bytes;
> /boot/home; attrextr; Be Application; 17.99 KB;
> /boot/home; config; Folder; 2.00 KB;
> /boot/home; lol.sh; Text File; 1.11 KB;
> /boot/home; mail; Text File; 2.00 KB;
> /boot/home; petals.sh; Text File; 5.15 KB;
> /boot/home; queries; Text File; 2.00 KB;
> /boot/home; salida.txr; Text File; 34.20 KB;
> /boot/home; salidans.txr; Text File; 0 bytes;


Pero de ese texto te interesa lo que habria en el cuarto campo? Text file?
etc
Entonces para parsearlo... se puede:

% cat file | cut -d';' -fd3

eso selecciona el campo 3 delimitado por ;    (quizas hay algun error de
sintaxis -> % cut --help)

% cat file | grep "Text File"

te sacaría solos los de texto

bueno despues tr te permite cambiar un caracter por otro...

bueno esto es todo un arte hay mas comandos, pero eso son los que acando
utilizando mas....

Other related posts: