[LUGOS] Primerjava

Jaka Močnik jaka at gnu.org
Mon Jan 12 16:45:00 CET 2004


On Mon, 2004-01-12 at 15:43, Robert Ludvik wrote:
> Rad bi torej primerjal samo string od zacetka vrstice do enacaja (=). 
> Skratka, ugotovil bi rad, ce je bila dodana kaksna nova spremenljivka 
> v php.
vaja iz awka;)

-- cut here --
#!/bin/sh
IMENIKI="en sl"
DATOTEKE="a.php b.php"

for IMENIK in $IMENIKI; do
  for DATOTEKA in $DATOTEKE; do
    awk -F '=' '{ print $1; }' <$IMENIK/$DATOTEKA >$IMENIK/$DATOTEKA.bla
  done;
done;

for DATOTEKA in $DATOTEKE; do
  diff -u en/$DATOTEKA.bla sl/$DATOTEKA.bla
done

for IMENIK in $IMENIKI; do
  rm $IMENIK/*.bla
done
-- cut here --

ob predpostavki, da v teh imenikih nimas datotek, ki bi se koncale na
.bla in da bos znal prebrat unified diff;)

lp,
	jaKa

-- 

email: jaka at gnu.org
w3:    http://fish.homeunix.org/people/jaka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://liste2.lugos.si/pipermail/lugos-list/attachments/20040112/00a441cb/attachment-0001.pgp


More information about the lugos-list mailing list