[ale] How to Increment a number in a config file?

greg at turnstep.com greg at turnstep.com
Fri Sep 7 12:33:03 EDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Perl one-liner from a bash shell:

perl -pi -e "s#(SerialNumber=)(\d+)#\$1.(\$2+1)#e;" sav.cfg

The ownerships and perms should stay the same.

Greg Sabino Mullane
greg at turnstep.com
PGP Key: 0x14964AC8 200109071232

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBO5j2pLybkGcUlkrIEQKJcwCcDnMAFucQqKwpyas+7/
8DviPHSvsAn0GA
gv6ABB6HRPzXVCo8GvUmqrY3
=1dPR
-----END PGP SIGNATURE-----

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list