simuling a CR in a ksh script

Hello Every body!!!
I'm writting a script and I plain to get the PID of a process resulting from a command.

for ex: ( `command` ) & echo $!>PID_FILES

but when I start this line , le system need me to tapped on ENTER
to stop the command, whether it is in stand by.

How may I simulated on the script the carrier return, in order to not be blocked.

thanks to you all!

You are running this command in background mode which would put it in the background except that you are running another command afterwards. Your script is most likely hanging on the "echo " portion. Maybe you can put a ; in after the &.

That may solve your problem. However, it is hard to see where your $!>PID_FILES is coming from unless you show the rest of your script.

:wink: