Columns with cutCommand line · 0/4 steps

Pick a columnstep 1 of 4 · beginner

Support

The command is shown. Click it to run, or type your own.

By the end of this lesson you can
  • Select a single column with cut -f
  • Keep several columns or a range (-f2,4 and -f2-4)
  • Handle non-tab files by setting the delimiter with -d
  • Pipe cut into sort | uniq -c to summarise a column

Before you startThe pipe |, and the sort | uniq -c counting idiom.

cut -f2 keeps the second field. By default cut splits on tabs, and variants.tsv is tab-separated.

Extract the gene column (field 2) from variants.tsv.

cutthe tool
-f2which columns (field 2)
variants.tsvthe file to read
Every command has the same shape: the tool, then options that tune it, then what it works on.
Key concept

Command-line fields are counted from 1, not 0. So the first column is -f1 and the second is -f2. This 1-based convention holds across cut, sort -k, and awk ($1, $2, …).

workspace · terminal

Type a command, or click the suggested one. ↑/↓ recall history, Tab completes file names. New to this? Hit Explain this command to see it in plain English.

…
workspace/shared/data0 files
Booting the WebAssembly runtime…
Command line0 / 4 stepsStep 1WASM shell