I was reading the O'Reilly book "Unix in a nutshell", and I saw there that commands can be grouped and executed in the current shell using the following format:
{ cmd1 ; cmd2 }
I didn't understand how this is possible, as I knew that a call to exec replaces a shell's data, and therefore the shell can't return from an exec system call.
So I tested the command and I can't understand what happened. I entered into a command line and I'm not sure to what does the command line belong.
Is it just the terminal emulator's command line, stripped down from the shell?
Also, how is executing commands in the current shell in any way useful?