0

I ran the following code and when I reached the second heredoc I became stuck in an at prompt (see image below). How to safely quite from this (without braking anything)?

The code:

bash /dev/fd/40 40<< 'PMA'

cat << PMA_UNINSTALL | at 'now + 2 minutes'

phpdismod mcrypt mbstring 
apt-get purge phpmyadmin -y
service apache2 restart
sed -i 's/Include \/etc\/phpmyadmin\/apache.conf/ /g' /etc/apache2/apache2.conf

PMA_UNINSTALL

PMA

The promot:

enter image description here

muru
  • 207,970

2 Answers2

4

The quit the at prompt, press CtrlD on a new line:

$ at now
warning: commands will be executed using /bin/sh
at> echo "hi"
at> <EOT>
job 6 at Sun Jan  1 20:20:00 2017

The <EOT> is printed by at on pressing CtrlD.

muru
  • 207,970
  • 1
    EOT meaning End Of Transmission – solsTiCe Jan 01 '17 at 14:52
  • I hit Return, and then combining Ctrl+d but nothing happens. –  Jan 01 '17 at 15:05
  • 1
    @Benia give a verifiable example - for the pic you show, there's no prompt, and the code snippet you give causes bash to segfault on my system after I type PMA. – muru Jan 01 '17 at 15:07
0

CTRL+Z (or CTRL + some key near to Z), brought me back to Bash.