Home

SC

sc - unix spreadsheet calculator crib sheet

E) CELLS
m Followed by any lower-case letter, marks the current cell with that letter.
c Copy a marked cell to current cell (it adjusts formula)

G) FILES
P write out file in sc format
W write out in ascii format (it appends `asc' extension)

H) ROW AND COLUMN COMMANDS
ic insert column (left/right??)
ir insert row above

I) RANGE COMMANDS
rd range define: assign a name to a cell or a range of cells

FORMATTING
f whole column
  > < increase/decrease physical width
  + - increase/decrease decimal places



Examples

Files can be found in repo tacc/sc

Example01

Combining two input sc files (inp1.sc and inp2.sc) and producing an ASCII output file out.asc:
cat inp1.sc inp2.sc | sc -W % - > out.asc
where inp1.sc is:
let A0 = 10
let A2 = @sum(A0:A1)
goto A2 A0
and inp2.sc is:
let A1 = 20
let foo = 20 # where is foo is some cell that you have defined using rd

Macros

put - write out sc-parseable output

  • put "" - save the sc file using current file-name
  • put "foo.sc" - save the sc file as foo.sc

    write - write output as ascii

  • write "" - writes giving as asc extension based on filename
  • write "foo.asc" - save the ASCCI test as file foo.asc

    quit

    Quits without saving. Use the put statement if you want to save your work.
  • psc

    psc - prepare sc files - allows you to do things like convert CSV files to sc format. E.g. psc -d , <file.sc >file.sc
    Author:  Mark Carter
    Created: 16-Apr-2012
    Updated: 20-Apr-2013