sed -i 's/\(.\{5\}\)//' file.m
Here, the "sed" function of the Linux command line is used with the -i (for "in place") switch to remove the 5 first characters from each line in the file "file.m". It looks a bit messy, but it works.
My name is Martin H. Skjelvareid, and I am a developer and researcher in acoustics, signal processing and image processing. In this blog I'll publish various posts on the tools I use in my everyday work. I have been using Matlab and LaTeX for some years now, and I am also trying to learn IDL and Linux. This blog is a place for me to collect my tips and tricks, and hopefully also a place for others to find useful information. Feel free to comment! :-)
Copyright © The tools of the trade. All rights reserved.
Blogger templates created by Templates Block | Wordpress theme by Design Disease
0 comments:
Post a Comment