if [ -z $EDITOR ] ; then echo "Your EDITOR environment is not set" echo "I will assume you want to use vi..OK" echo -n "Do you wish to change it now? [y..n] :" read ANSif [ "$ANS" = "y" ] || [ "$ANS" = "Y" ]; then echo "enter your editor type :" read EDITORif [ -z $EDITOR ] || [ "$ANS" = "Y" ]; then echo "enter your editor type :" read EDITOR if [ -z $EDITOR ] || [ "$EDITOR" = "" ]; then echo "No, editor entered, using vi as default" EDITOR=vi export EDITORfi EDITOR=$EDITOR export EDITOR echo "setting $EDITOR"fielse echo "Using vi as the default editor" EDITOR=vi export vifi~ ~ ~
Bashif [ -z $EDITOR ] ; then echo "Your EDITOR environment is not set" echo "I will assume you want to use vi..OK" echo -n "Do you wish to change it now? [y..n] :" read ANS if [ "$ANS" = "y" ] || [ "$ANS" = "Y" ]; then echo "enter your editor type :" read EDITOR if [ -z $EDITOR ] || [ "$ANS" = "Y" ]; then echo "enter your editor type :" read EDITOR if [ -z $EDITOR ] || [ "$EDITOR" = "" ]; then echo "No, editor entered, using vi as default" EDITOR=vi export EDITOR fi EDITOR=$EDITOR export EDITOR echo "setting $EDITOR" fi fielse echo "Using vi as the default editor" EDITOR=vi export vifi
BashEDITOR=$EDITORexport vi