Solution 1:

In UNIX, a 'batchfile' is known as a shell script. A typical BASH shell script will start with a magic line that tells the operating system which shell to execute the script with, so your example would end up:

 #!/bin/bash

 cd /home/user/scripts   
 sh runTHISthing.sh pub   
 cd /home/user/logs  
 tailf pub.log

NOTE: After you create the file, you have to mark it as executable, in order for the OS to try executing it:

chmod +x myscript