OSX can use a bash script to open calc; any way to run a command?

Hi,

In OSX, I can use a bash script to open a calc spreadsheet; Is there any way to execute a command, such as to load a particular previously saved spreadsheet? And then place a value in a cell?

This Linux Questions thread suggests using:

libreoffice "macro:///Standard.Module1.findandreplace" file.odt

… for running a macro (e.g., named “findandreplace”) in a document that is to be opened. This macro could be written to perform the types of actions described. Is this what you are asking about?