Skip to main content
1 of 2
Lesmana
  • 28.1k
  • 20
  • 85
  • 87

The man page of cut says

Selected input is written in the same order that it is read, and is written exactly once.

So you have to use another tool instead of cut. For example sed, awk, perl, python.

Lesmana
  • 28.1k
  • 20
  • 85
  • 87