Skip to main content
Included the file. Neat trick by the way!
Source Link
terdon
  • 252.3k
  • 69
  • 480
  • 718

You can play some trick - first number lines with * only then strip * and spaces if you want

nl -bp^[*] file | sed 's/^\s*\|\s*\*//g'

You can play some trick - first number lines with * only then strip * and spaces if you want

nl -bp^[*] | sed 's/^\s*\|\s*\*//g'

You can play some trick - first number lines with * only then strip * and spaces if you want

nl -bp^[*] file | sed 's/^\s*\|\s*\*//g'
Source Link
Costas
  • 15k
  • 24
  • 38

You can play some trick - first number lines with * only then strip * and spaces if you want

nl -bp^[*] | sed 's/^\s*\|\s*\*//g'