История изменений
Исправление Cave-Canem, (текущая версия) :
вопрос: почему строки с hello, не попали в результат?
(Проблему с сортировкой заметили?)
Потому что:
cat "file" | nl | sort -k 2d
5 123 456 789
14 Cat washed frame
6 Vova drowned
2 cat drank vodka
8 cat drank vodka
16 cat drowned
17 cat the Fool
15 cat vodka drank
10 cat whore juvenile
4 dad drank vodka
13 dad washed frame
11 hello, www!
18 hello www!
1 hello, y-cat!
9 mom at work
3 mom washed frame
12 petya the Fool
7 vova fool
sort --version
sort (GNU coreutils) 5.93
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and Paul Eggert.
gsort --version
sort (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and Paul Eggert.
Исходная версия Cave-Canem, :
вопрос: почему строки с hello, не попали в результат?
(Проблему с сортировкой заметили?)
Потому что:
cat "file" | nl | sort -k 2d
5 123 456 789
14 Cat washed frame
6 Vova drowned
2 cat drank vodka
8 cat drank vodka
16 cat drowned
17 cat the Fool
15 cat vodka drank
10 cat whore juvenile
4 dad drank vodka
13 dad washed frame
11 hello, www!
18 hello www!
1 hello, y-cat!
9 mom at work
3 mom washed frame
12 petya the Fool
7 vova fool