Reputation: 1681
I'm trying to redirect the output of a command from a terminal to a text file. My command is:
rails_best_practices . > rbp.txt
It works fine but the contents of the file is a bit different.
[1;31m/Users/carlwilliamtablante/www/serviceseeking/db/schema.rb:16 - always add db index (abns => [provider_account_id])[0m
As you can see in the screenshot, it outputs an ESC
character, but when trying to view it on the reminal using cat
, it should display the line number. So how do I fix this?
Upvotes: 0
Views: 124
Reputation: 4628
From https://github.com/railsbp/rails_best_practices: you can use --without-color
to omit the colour codes.
Upvotes: 2