Re: Sending Command Pipeline to a detached Screen

2016-11-30 Thread aws backup
Thank you :-) Great! It works perfectly. > On 30 Nov 2016, at 09:15, Andrew King wrote: > > Try: > > screen -dmS Screen-Name /bin/bash -c "Command1 | tee logfile | tee >(mail -s > 'subject' not...@gmail.com ") > > > On Wed, 30 Nov 2016, 00:26 aws backup,

Re: Sending Command Pipeline to a detached Screen

2016-11-30 Thread Andrew King
Try: screen -dmS Screen-Name /bin/bash -c "Command1 | tee logfile | tee >(mail -s 'subject' not...@gmail.com") On Wed, 30 Nov 2016, 00:26 aws backup, wrote: > Hello, > > now I built following pipe example: > > *screen -dmS Screen-Name /bin/bash -c "Command1 | tee logfile | mail -s > 'subject'

Re: Sending Command Pipeline to a detached Screen

2016-11-29 Thread aws backup
Hello, now I built following pipe example: screen -dmS Screen-Name /bin/bash -c "Command1 | tee logfile | mail -s 'subject' not...@gmail.com " Works fine so fare that I have the log file and get a notification email with the log as well. But now nothing appears anymor

Re: Sending Command Pipeline to a detached Screen

2016-11-28 Thread aws backup
Hi Neal, thank you so much. I like your suggestion. Works great and much simpler ;-) Regards, Robert > On 23 Nov 2016, at 06:31, Neal Fultz wrote: > > screen -d -m -S Screen-Name > screen -S Screen-Name -p 0 -X stuff "Command1; Command2 | Command3 && > Command4"$(echo -ne '\015') > > This f

Re: Sending Command Pipeline to a detached Screen

2016-11-28 Thread aws backup
Thank you. With me ^M works only in Terminal but not in a script. I need it as a script. > On 24 Nov 2016, at 02:57, Michael Parson wrote: > > On 2016-11-22 22:31, Neal Fultz wrote: >> SCREEN -D -M -S SCREEN-NAME >> SCREEN -S SCREEN-NAME -P 0 -X STUFF "COMMAND1; COMMAND2 | COMMAND3 && >> COMMA

Re: Sending Command Pipeline to a detached Screen

2016-11-23 Thread Michael Parson
On 2016-11-22 22:31, Neal Fultz wrote: SCREEN -D -M -S SCREEN-NAME SCREEN -S SCREEN-NAME -P 0 -X STUFF "COMMAND1; COMMAND2 | COMMAND3 && COMMAND4"$(ECHO -NE '\015') You can end your command with "^M" instead of the echo bits to generate the : screen -S screen-name -X stuff "echo hello worl

Re: Sending Command Pipeline to a detached Screen

2016-11-22 Thread Neal Fultz
*screen -d -m -S Screen-Name* *screen -S Screen-Name -p 0 -X stuff "Command1; Command2 | Command3 && Command4"$(echo -ne '\015')* This first creates a screen session running a shell, most likely bash. Second, it sends some commands to the terminal input using stuff. In this case, you could append

Re: Sending Command Pipeline to a detached Screen

2016-11-22 Thread aws backup
Ok I figured out the correct syntax. screen -d -m -S Screen-Name; screen -S Screen-Name -p 0 -X stuff "Command1; Command2 | Command3 && Command4"$(echo -ne '\015') $(echo -ne '\015') starts the command pipe in the screen session. But now the screen is not terminating anymore after the command

Re: Sending Command Pipeline to a detached Screen

2016-11-19 Thread aws backup
Hi Colin, thank you. I found following for return "\015" But if I send it to the screen either on the end of the command pipe …Command4\015" or as a separate command at the end ; screen -S Screen-Name -p 0 -X stuff "\015" it is only attaching the text \015 but not executing the return comm

Re: Sending Command Pipeline to a detached Screen

2016-11-19 Thread aws backup
Hi Colin, thank you. I tried but nothing arrived in the screen or it did arrive but didn't start. What is the exact syntax? Can I start the screen and send the commands in one command or do I have to start the screen in one command and in the next command I send the pipeline? I tried it like th

Re: Sending Command Pipeline to a detached Screen

2016-11-19 Thread Colin Richardson
Have u tried -X stuff "command | command2" with the quotes? On 19 Nov 2016 7:36 am, "aws backup" wrote: > Hello, > > I would like to start a screen session in detached mode and send a command > pipeline to it. How can I do this? > With my approach > > *screen -d -m -S Name Command1; Command2 |

Sending Command Pipeline to a detached Screen

2016-11-18 Thread aws backup
Hello, I would like to start a screen session in detached mode and send a command pipeline to it. How can I do this? With my approach screen -d -m -S Name Command1; Command2 | Command3 && Command4 only Command1 is send to the screen. Thank you. __