PSC(1)

πŸ’– PSC(1) β€” the General Commands Manual glow-up πŸ’–

okay bestie, so this is psc from the General Commands Manual, and it's literally the little matchmaker that gets your messy data ready for sc(1) πŸ₯°βœ¨


🌸 NAME 🌸

psc β€” prepare sc files πŸŽ€


✨ SYNOPSIS ✨

psc [-fLkrSPv] [-s cell] [-R n] [-C n] [-n n] [-d c]

πŸ¦‹ DESCRIPTION πŸ¦‹

So psc is the ✨prep era✨ of data β€” it gets stuff ready to be fed into the spreadsheet calculator sc(1). It reads totally normal ascii data on standard input, and standard output is an sc file. No cap.

With no options at all, psc starts the spreadsheet in cell A0. Strings are right justified (yes, right, we're fancy like that πŸ’…). All data on a line goes into the same row, and every new input line makes the output row number go up by one. Default delimiters are tab and space. And the column formats get set to one larger than the number of columns required to hold the largest value in the column β€” she measures everything so nothing gets squished, periodt.


πŸ’… OPTIONS πŸ’…

  • -f β€” Omit column width calculations. This one's for when you're prepping data to be merged with an existing spreadsheet. If you don't pass it, the column widths calculated for the data psc read will override the ones already set in the existing spreadsheet. so like, she's taking over, respectfully πŸ™ˆ
  • -L β€” Left justify strings. we're switching it up, okay?
  • -k β€” Keep all delimiters. This makes the output cell change on every single new delimiter it hits in the input stream. The default behaviour is to condense multiple delimiters into one, so the cell only changes once per input data item. no condensing today, we keep every crumb πŸ“
  • -r β€” Output the data by row first then column. If your input is just a single column, this option flips it: you get one row with multiple columns instead of a single-column spreadsheet. she rotated, she ate πŸ”₯
  • -s cell β€” Start the top left corner of the spreadsheet in cell. For example, -s B33 will arrange the output data so the spreadsheet starts in column B, row 33. so iconic, pick your own starting point πŸ‘‘
  • -R n β€” Increment by n on each new output row.
  • -C n β€” Increment by n on each new output column.
  • -n n β€” Output n rows before advancing to the next column. This one's for when the input is arranged in a single column but the spreadsheet is supposed to have multiple columns, each of which is length n. chunking the vibe 🌈
  • -d c β€” Use the single character c as the delimiter between input fields. just one character, bestie, don't get greedy.
  • -P β€” Plain numbers only. A field counts as a number only when there is no imbedded [-+eE]. strict queen ⭐
  • -S β€” All numbers are strings. everything is a string now, no exceptions πŸ’€
  • -v β€” Print the version of psc. just a lil flex πŸ’œ

🫢 SEE ALSO 🫢

sc(1) β€” go say hi to her sister πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Robert Bond β€” the legend, the icon, the moment ✨


real talk: this whole thing is literally about sc(1) data prep, so if -f and -s are confusing you, just remember she's either merging into an existing spreadsheet or starting fresh in a cell you picked. that's the whole plot πŸŽ€

and that's the tea, bestie 🧚 this page came to you as PSC 7.16_1.1.3 241123 0424, dated 19 September 2002 β€” a whole vintage icon still serving looks πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from