mauvais caractere de fin de ligne
Bonjour
J´ai un script ksh ou j´utilise une instruction select avec un menu construit automatiquement via une variable (qui recupere le resultat d´une commande systeme unix)
Aussi de temps en temps l´affichage du menu est mauvais :
1) CStibrvd68^JCStibrvd752
2) Back
Le caractere ^] vient s´introduire entre les champs
J´ai essaye de faire des clear du terminal mais rien a faire
Aussi la seule solution que j´ai trouve c´est de reexecute mon shell
Voila le code qui est dans une fonction ksh que je source :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| function parse_selection {
#set -x
echo "> parse_selection <"
echo $$
echo "\n"
AL=`cd $ROOTAPPL; ls -d */ | xargs -l basename`
select application in $AL Back
do
REPLY=""
case $application in
CS*)
export FPATH=$ROOTAPPL/$application:$ROOTAPPL0/.template
if [ $debug -eq "1" ] ; then
env | grep -i fpath
fi
export TARGET=$TARGET ; export DIST=$DIST; export application=$application
echo "$ROOTAPPL/$application"
if [ -f "$ROOTAPPL/$application/variables" ]; then
cd "$ROOTAPPL/$application"
clear_variables
. ./variables
fi
export INSTF="0"
selection
;;
Back)
export PASS="false"; break
;;
*)
echo "${bold}Please select an application to be installed on host : $TARGET ${offbold}\n"
;;
esac
done
} |
Encore merci pour votre aide
Cdlt