Problem in reading the input value

echo "Enter the Value : "
read value
sed '1s:\(.\{6\}\)\(.\{4\}\):\1'$value':' flextran$RUN_DATE-completed.txt > temp.txt
mv temp.txt flextran$RUN_DATE-completed.txt

on the run time after entering the input value it waits for keystroke and the values is not input to the function

The output shows as,

Enter the Value :
2492  [Enterned value]

---- it exitst after 3 times pressing enter
it also does not take the input value for the sed command. please give some help to solve this condition.

Please execute the script with xtrace enabled and post the output.

sh -xv <your_script>

Change sh with the shell you're currently using.

+ echo Enter the Value :
Enter the Value :
+ read value
3135


+ sed 1s:\(.\{6\}\)\(.\{4\}\):\1: flextran20120900-completed.txt
+ 1> temp.txt
+ mv temp.txt flextran20120900-completed.txt

This is the output i got after setting xtrace

I cannot reproduce this behavior with your script. Could you try to run the script from a different terminal? Which shell are you using?

we are using bash and Kshell. Some times i m getting the correct output, but sometimes it waits for press 3 times enter and also didt get ouput