getcol(1)

πŸ“¦
version 3.9.7 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– getcol(1) β€” like, the manual page but make it make sense πŸ’–

okay bestie, pull up a chair πŸͺ‘ because we're about to talk about getcol from the General Commands Manual and honestly? it's a little icon. it grabs the columns you want out of an ASCII table file and hands them to you like a bestie passing you the aux cord. no cap. πŸ’…


✨ Name ✨

getcol β€” Extract specified columns from an ASCII table file

like, exactly that. you point at columns, it pulls them out. slay. πŸ‘‘


🌸 Synopsis 🌸

getcol [-amv][-n num][-r lines][-s num] filename [column number range]

that's the whole vibe check right there. flags in the front, file and column range at the back, periodt.


πŸ¦‹ Description πŸ¦‹

Extract specified columns from an ASCII table file

that's it. that's the whole thing. it's giving "simple but does one job flawlessly" and honestly? main character energy. πŸŽ€


πŸ’œ Options πŸ’œ

here comes the part where I list every single one, because we do not skip. we do not summarise. we are thorough in this house. 🫢

  • filename β€” the name of an ASCII table file. bestie, at least one of these has to be present for anything to print at all, okay? if it's stdin or STDIN, then an ASCII table is expected as standard input. and if there's no input file at all? standard input is assumed. no drama. πŸ’–
  • @filename β€” the name of a file that contains a list of ASCII table files. if this one shows up, then any other file names on the command line get completely ignored. like, ghosted. ignored. πŸ™ˆ
  • field range β€” print the value of these columns for however many lines of the table the -n argument says, and that's after skipping however many lines -s says. oh and a value of 0? that makes the entire input line print out. the whole thing. iconic. ✨
  • -a β€” sums up all the numeric columns you selected and prints the sum on the line following the result. columns with no sum get filled with ___. (added in version 2.6.9 πŸŽ‰)
  • -b β€” input is a bar-separate table file. bars. like |. 🍸
  • -c β€” add the count of the number of lines in each column at the end
  • -d <number> β€” number of decimal places in f.p. output
  • -e β€” compute the medians of the selected columns
  • -f β€” print the range of values in the selected columns
  • -h β€” print Starbase tab table header
  • -i β€” input is a tab-separate table file
  • -k β€” print the number of columns on the first line
  • -l <number> β€” number of lines to add to each line
  • -m β€” compute the means of all numeric columns selected, printing the mean on the line following the result (or on the line following the sum if -a is used). columns with no mean get filled with ___. (added in version 2.6.9 πŸ’«)
  • -n num β€” print selected columns for this many lines. if you don't specify it, all lines get read after the number of lines given to -s have been skipped. 🌈
  • -o β€” OR the conditions instead of ANDing them
  • -p β€” print only sum, mmean, sigma, median, or range β€” not the entries themselves. like, the receipts only, no itemised list. 🧾
  • -r @listfile / -r line range β€” print columns from the lines specified as either the first nonzero number on each line of the file listfile, or the comma- and hyphen- delimited range. i.e. 1-5,10-12 will print values from lines 1, 2, 3, 4, 5, 10, 11, and 12. (added in version 2.6.12 ⭐)
  • -s num β€” skip this many lines before starting to print values. if you don't specify it, no lines get skipped. zero skipping. straight in. 😀
  • -t β€” Starbase (tab-separated) table output
  • -v β€” print more information about the process. she's chatty. she's sharing. πŸ’¬

🌐 Web Page 🌐

http://tdc-www.harvard.edu/software/wcstools/getcol.html

go look at it. the lore is there. πŸ“–


πŸ‘‘ Author πŸ‘‘

Jessica Mink, SAO (jmink@cfa.harvard.edu)

we stan. absolute legend behaviour. 🫑


okay real talk for one sec bestie: this page is from WCSTools, and the footer date on it is 8 November 2001. so yes, this manual is older than most of us and it's still out here doing its little column-extracting thing. respect the elders. πŸ’€βœ¨

now go extract some columns, you absolute icon. bye bestie!! πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ’