referencing in files
Mario Hoerich
lists at MHoerich.de
Wed Mar 2 13:04:42 GMT 2005
# Jarrod - Cybertek:
>
> Say i have a file /root/setup.client.sh, and it has this line:
> IFACE=ng10
> Now I want to have the motd, when it is displayed after login, to go fetch
> the current value of that IFACE, and display that value.
This probably won't get any points for style, but instead of using
/etc/motd, you could just as well do this with a small script in your
.zlogin/.login/whatever file. E.g.
if [ ! -e .hushlogin ]; then
IF=`awk '/IFACE *=/ { gsub(/IFACE *= */,""); print; }' setup.client.sh`
echo "My interface: $IF"
fi
HTH
Mario
More information about the freebsd-questions
mailing list