(no title)
sudahtigabulan | 3 months ago
Even you remember the flags, cut(1) will not be able to handle ls -l. And any command that uses spaces for aligning the text into fixed-width columns.
Unlike awk(1), cut(1) only works with delimiters that are a single character. Meaning, a run of spaces will be treated like several empty fields. And, depending on factors you don't control, every line will have different number of fields in it, and the data you need to extract will be in a different field.
You can either switch to awk(1), because its default field separator treats runs of spaces as one, or squeeze them with tr(1) first:
ls -l | tr -s' ' | cut -d' ' -f3
lelanthran|3 months ago
You don't have to use fields.
sudahtigabulan|3 months ago