Thanks here are some more details: We have a bash function like: function startService { echo "Starting service $1" sleep 1 screen -S services -p "$1" -X eval 'stuff "cd '$1'\015"' sleep 1 screen -S services -p "$1" -X eval 'stuff "./start.sh\015"' }
This is called a dozen times with different service names from a main start script. Once and a while a stuff command is just ignored breaks that service from starting. I was aware of the chdir command, but I'm not aware of a method of invoking another script inside a specified console. If there is another approach for this similar to a native chdir command, this may help. Thanks again. On Wed, Feb 24, 2010 at 1:44 AM, Sadrul Habib Chowdhury <ima...@gmail.com> wrote: > * Clint had this to say on [23 Feb 2010, 10:30:42 -0500]: >> Greetings, >> >> We have a startup script which creates a screen with about a dozen >> consoles and as part of that script we send commands to each of the >> console using the "stuff" syntax like so: >> >> screen -S services -p "$1" -X eval 'stuff "cd '$1'\015"' >> >> We are finding that this script doesn't work all the time. The script >> will execute to the end, but sometimes certain commands executed with >> stuff just seem to be ignored, like they never got stuffed to the >> screen :) >> >> Has anyone ever had any experience with an issue like this? Any >> insight would greatly be appreciated. > > I remember some issue similar to this. I do not remember the exact > details, but I think there was some race where the '-X' command was sent > before the new window was created, which means it gets ignored. More > details on how your entire script works might be helpful. > > Also, in this specific example, are you aware of the 'chdir' command in > screen? > > Cheers. > Sadrul > > _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users