Questions tagged [tac]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
190 views

Reversing a file line-wise and character-wise

Input: hello enrico output: ocirne olleh To do this, I can simply tac a file and pipe the output to rev (or the other way around), so one function that does the job is just this: revtac() { tac &...
12
votes
2answers
948 views

Explanation of tac --before

-b, --before The separator is attached to the beginning of the record that it precedes in the file. And I can't understand the following output: $ echo -e "Hello\nNew\nWorld\n!" > file $ ...
1
vote
1answer
129 views

Usage of readarray and tac

I have a file containing "lines" of text, for now only two lines. I need to create a reversed array of these lines - FIFO style. Using "readarray" in this fashion works fine: readarray -t FileArray &...
5
votes
2answers
1k views

reverse file character by character using tac

I want to use the tacto reverse a text file character by character. On the info page for coreutils I found an example saying: #Reverse a file character by character tac -r -s 'x\|[^x]' However ...