Question: I want to write a bash script to re-attach to the existing linux screen, perform some commands and then detach from that screen. I know to create a new linux screen in detached mode and perform some commands. But I haven't found a way to re-attach to a existing linux screen.

Answer: 
You can give a name to a screen session by using the -S option.
Example : `screen -dS NAME <command>`

Then you can reattach to that session using `screen -r NAME`
You can send a command to a running screen using `screen -X exec`. See the man page for redirection options.

```
screen -X exec ls

```

Alternatively you can send text to a running screen's stdin buffer using `screen -X paste`, as if the user had typed it. This can be a way of running commands inside an interactive shell.

```
screen -X register a "ls\n"
screen -X paste a

```