1 2 3 4 5
# do not edit /etc/shells on upgrades if [ $1 -eq 1 ]; then grep -Fqx /bin/csh /etc/shells || echo /bin/csh >> /etc/shells grep -Fqx /bin/tcsh /etc/shells || echo /bin/tcsh >> /etc/shells fi
1 2 3 4
# do not edit /etc/shells on upgrades if [ $1 -eq 0 ]; then sed -i -e '/^\/bin\/t\?csh$/d' /etc/shells fi