1

How do you truncate all columns in a file to a specific length?

view story
linux-howto

http://unix.stackexchange.com – Given columned text in a file that is delimited by a certain character, how do you truncate the width of either a specific column(s) or all columns? The use case is that I am reading some log files that have space delimited columns. Some of the columns in the log are very long urls that make the file difficult to read. I don't really care about the entire content of the urls, so I would like to truncate the length of these columns to something more readable. I would be curious to know how to specify specific columns to truncate, but really I only need to figure out how to just truncate all (HowTos)