How can I cut a text file using vim? For example I would like to cut the file up to position 56. So I would like to keep everything from position 1-56, and delete everything from position 57 (including 57) to the end of the line for EVERY line.
Text file:
Web Application - http://sharepoint
Url CompatibilityLevel
--- ------------------
http://sharepoint 15
http://sharepoint/sites/appcatalog 15
http://sharepoint/sites/devtest 15
http://sharepoint/sites/publishing 15
I can get more or less the results I want using awk:
$awk '{print $1}' file
Results:
Web
Url
---
http://sharepoint
http://sharepoint/sites/appcatalog
http://sharepoint/sites/devtest
http://sharepoint/sites/publishing
But say I want to split hairs and really want to keep the title. How can I technically cut this file up to position 56 using vim. Preferably within vim. Meaning I have the file open in vim.