[LUGOS] Diff v if-u

Jaka Močnik jaka at gnu.org
Thu Jun 30 14:05:20 CEST 2005


On Thu, 2005-06-30 at 11:36 +0200, Aleš Curk wrote:
> Ukvarjam se z eno bash skriptico, ki naj bi mi v primeru razlike v dveh 
> datotekcah izvedla določeno operacijo drugače pa ne
> 
> razmišljal sem, da bi uporabil ukaz diff a ga ne znam uporabiti v if 
> stavku bash lupine
> 
> A mi zna kdo pomagat?
morebiti takole:

if diff a.txt b.txt >/dev/null; then
	echo not changed
else
	echo changed
fi

lp,
	jaKa

-- 
e-mail: jaka at gnu.org
w3:     http://fish.homeunix.org/people/jaka/




More information about the lugos-list mailing list