ronmanp Posted December 5, 2007 Posted December 5, 2007 Hi,I need help with my script that needs to write a letter (a or f) for english and french to a file and then I need to read that letter to create a variable named $language.Im totally lost! lolThanks in advance,
ronmanp Posted December 5, 2007 Author Posted December 5, 2007 (edited) nevermind I found it exec 3<> ~/sdelrcread langue <&3exec 3>&-this will read the first line of sdelrc and create a variable named $langue with it !ps: I have another question ! Is it possible to use a case inside a case ? Because Im getting a error with this ...echo "Quel langue? / What language? (F)rançais / (E)nglish?:" read language case "$language" in "f"|"F" ) echo f > ~/sdelrc echo "Écraser le fichier SpecFICH (O)ui , (N)on?:" read confirmation case $confirmation in "o"|"O" ) mv -f $1 ~/corb.dir ;; "n"|"N" ) exit 0 ;; esac "a"|"A" ) echo a > ~/sdelrc echo "Overwrite file FILESpec (Y)es , (N)o?:" read confirmation case $confirmation in "o"|"O" ) mv $1 ~/corb.dir ;; esac esac Edited December 5, 2007 by ronmanp
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now