Date: Fri, 24 Mar 2000 15:29:37 +0000 From: J McKitrick <jcm@freebsd-uk.eu.org> To: questions@freebsd.org Subject: script to change config files Message-ID: <20000324152937.B89615@dogma.freebsd-uk.eu.org>
next in thread | raw e-mail | index | archive | help
Alright, i am very proud of myself for RTFMing and WTFP myself. (Writing The Fine Program). But i would like to know if there is a better way, and oif someone could give me a clue. I am a total neophyte at script programming, but it's only a matter of time and practice. Here's what i wanted to do: when i log into my shell account from work, i want one mutt config file with one set of colors. When i log in anywhere else, it's probably from my laptop, so i choose a config file with a different set of colors. In order to make sure all my changes are saved correctly, here's what i did: remove a file called 'flag', if it exists grep the output of 'w' for my gateway name output to the file 'flag' if 'flag' exists, cat my basic config file with one set of colors else cat them to another set. I'm sure there's an easier way to do this. I also need to be able to save changes easily, so when i logout, i don't have to mess with a changed .muttrc trying to merge diffs into the base version. Any suggestions? jm -- -------------------------------------------- Jonathon McKitrick -- jcm@freebsd-uk.eu.org The spice must flow.... -------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000324152937.B89615>