I am baffled at the response of these scripts.
Trial 1:
awk '{line_arr[$0] } END {for (line in line_arr) print line}' text_file
Output:
1
2
3
4
Trial 2:
awk '{line_arr[$0] } END {for (line in line_arr) print line}' text_file
Output:
is some text.
Hello. Here
Lots of random
text.
File content:
$ cat text_file
Hello. Here
is some text.
Lots of random
text.
Why is the index of the array storing as an actual value?
Why is the second trial out of order?
awkversion?