Get the first n chars for each line of a file
Mon. June 27, 2011Categories: Linux, Random intrests
Tags: bash, cat, Linux
cat file | colrm n
File’s contents:
8765 I like eating pie 8956 Sometimes I think I'm a robot 8796 I wonder what being a cat is like 4567 Time for food 4523 Pew Pew pew Space pope8765 I like eating pie
cat file | colrm 4
Output:
876 895 879 456 452
Hope that helps,
Pete

Comments