[LUGOS] inkrement številke v datoteki

Rok Krulec Rok.Krulec at fpp.edu
Mon Jun 3 11:36:48 CEST 2002


Ce bi imel datoteko ro.txt s tocno dvemi vrsticami:

#/bin/bash

RONUM=3D`cat ro.txt |tail -1|cut -d"=3D" -f2`
IRONUM=3D`expr $RONUM + 1`
echo "[Rollout]" > ro.txt
echo "SerialNumber=3D${IRONUM}" >> ro.txt
echo "SerialNumber=3D${IRONUM}"

Rok Krulec

Portoroz/Slovenia, 03.Jun 2002 @ 11:34 CET
Public PGP Security Key @ http://rok.fpp.edu/pgp.txt

On Mon, 3 Jun 2002, Robert wrote:
> Imam datoteko z vsebino:
>=20
> [Rollout]
> SerialNumber=3D6
>=20
> Ali ima kdo kak=B9no idejo, kako bi naredil skripto, ki bi ob vsakem
> zagonu pove=E8ala SerialNumber za 1?




More information about the lugos-list mailing list