Skip to content

Instantly share code, notes, and snippets.

@askucher
Created August 25, 2015 11:17
Show Gist options
  • Select an option

  • Save askucher/5f103335c36fe2f30892 to your computer and use it in GitHub Desktop.

Select an option

Save askucher/5f103335c36fe2f30892 to your computer and use it in GitHub Desktop.
nixar.before

Операция

$ cat filename.txt | sed 's/^\(.*\).$/\1 /'

###Удалить последний символ каждой строки в тексте

Вход

line 1
line 2
line 3
line 4
line 5

Операция

$ cat filename.txt | before " "

Выход

line
line
line
line
line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment