Sample Header Ad - 728x90

reverse file character by character using tac

7 votes
2 answers
2868 views
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 running tac -r -s seems to open standard input instead of printing the file. What does 'x\|[^x]' mean and what should I be doing? I also noted that the output for tac [file] and tac -r [file] are same and they're the same as cat [file]. Still can't figure out char by char reverse.
Asked by Weezy (679 rep)
May 28, 2018, 06:29 AM
Last activity: Dec 13, 2019, 09:42 PM