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?
在https://github.com/railsbp/rails_best_practices中 :您可以使用--without-color
来省略颜色代码。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.