cat ~/.bashrc
export PS1=`/sbin/ifconfig eth0:1 | /usr/bin/perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'`:$PS1
Replace eth0:1 with the name of the network interface
cat ~/.bashrc
export PS1=`/sbin/ifconfig eth0:1 | /usr/bin/perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'`:$PS1
Replace eth0:1 with the name of the network interface
No comments:
Post a Comment