Search code examples
shellsc

sc: spreadsheet calculator, execute with a script


Suppose I have a bunch of "homegeneous" sc-files, and I need to execute one specific sequence of commands in each of them. Essentially, I need this:

for f in `ls *.sc`; do sc $f <do something>; done

In <do something>, I would like to supply a sequence of sc commands in a script. For starters, let it be something like, for the cell Z9, assign some text string. The man-page does not feature a description of how this could be done; the online literature is scant, since sc is (unfortunately) not as popular as it (IMHO) deserves to be.


Solution

  • I read the docs more carefully, and understood that something of this kind can be done: sc -v -WA0:D13 myfile.sc. This outputs to stdin the table contained in the range A0:D13.