Deleting lines from the text file
2010-06-01
177 words
1 min read
Really useful for pretty big <a class="zem_slink freebase/en/computer_file" title="Computer file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Computer_file">files.
<a class="zem_slink freebase/en/sed" title="Sed" rel="wikipedia" href="http://en.wikipedia.org/wiki/Sed">sed –silent ’1,100 d’ <a class="zem_slink freebase/en/filename" title="Filename" rel="wikipedia" href="http://en.wikipedia.org/wiki/Filename">filename
here the command will delete the first 100 lines. You can specify whatever range you want. This will not delete the lines from the file but only display the contents on the console after deleting the 100 lines from begining.
If you want to store it in different file then you can use ”>” or ”»”<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.centernetworks.com/guhmshoo-quit-facebook-day-cartoon">Guhmshoo Looks at Quit Facebook Day (cartoon) (centernetworks.com) <li class="zemanta-article-ul-li"><a href="http://blogs.securiteam.com/index.php/archives/1374">Sometimes it’s just Windows … (blogs.securiteam.com) <li class="zemanta-article-ul-li"><a href="http://www.makeuseof.com/tag/2-ingenious-apps-to-help-organize-files-and-folders-on-your-mac/">2 Ingenious Apps To Help Organize Files and Folders On Your Mac (makeuseof.com) <li class="zemanta-article-ul-li"><a href="http://www.labnol.org/software/windows-problems-and-solutions/13766/">Simple Solutions to Common Windows Problems (labnol.org) <li class="zemanta-article-ul-li"><a href="http://techblissonline.com/bluray-dvd-cd-data-file-recovery-software-free-download/">Blu Ray/DVD/CD Data file recovery software (free) to recover damaged files (techblissonline.com) <li class="zemanta-article-ul-li"><a href="http://www.ghacks.net/2010/05/23/get-rid-of-gnome-keyring-password-reminder/">Get rid of GNOME keyring password reminder (ghacks.net) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a2e0d6ba-15f8-4a53-9f52-a28012b689cb/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b93.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">
Related Articles:
- 2010/05/27 vim – get the list of all the scripts available.
- 2010/05/16 Downloading all related videos from youtube with youtube-dl
- 2010/04/27 How To Modify Your Wordpress Theme Via The Browser Using Stiqr
- 2010/04/12 Liquid rescale and remove objects from the images.
- 2010/04/11 Advanced Sed Substitution Examples