recursive input from keyboard

March 11, 2011 at 13:03:56
Specs: unix
I wish to deploy recursive input from keyboard in a script which would make directories of the same name that are entered using keyboard, further i wish to stop the script on entering a particular string as an alphabet 'q'.

Thanx in advance!!!
Harmanpreet Singh


See More: recursive input from keyboard

Report •

#1
March 11, 2011 at 14:43:46
input="xx"
while read input
do
!= "q" ]
do

mkdir "$input"
done

Report •

#2
March 11, 2011 at 14:43:46
input="xx"
while read input
do
!= "q" ]
do

mkdir "$input"
done

Report •

#3
March 11, 2011 at 14:45:47
Sorry, fat fingers:

while read input
do
if [ $input != "q" ]
then
mkdir "$input"
fi
done


Report •
Related Solutions


Ask Question