HomeHome  PortalPortal  FAQFAQ  SearchSearch  RegisterRegister  Log in  
Editing without an editor Fatelogo_small openFATE - openSUSE feature tracking
Similar topics
    Latest topics
    » Difference between 42.2 and 42.1
    Editing without an editor Emptyby findoctr Thu Dec 15, 2016 7:53 pm

    » openSUSE Leap 42.1 ?
    Editing without an editor Emptyby findoctr Fri Feb 05, 2016 8:09 pm

    » Happy Turkey Day
    Editing without an editor Emptyby findoctr Thu Nov 26, 2015 1:45 pm

    » Happy 4th of July!
    Editing without an editor Emptyby bozo Sat Jul 04, 2015 12:56 pm

    » It's been a while ...
    Editing without an editor Emptyby bozo Mon Feb 23, 2015 8:34 pm

    » Mondo chillers
    Editing without an editor Emptyby bozo Wed Feb 18, 2015 5:11 am

    IRC Channel
    You can also find us on IRC's freenode.net as #suseunbound.


     Editing without an editor

    Go down 

    Posts : 248
    Join date : 2010-02-23
    Age : 55
    Location : snow drift in minnesota

    Editing without an editor Empty
    PostSubject: Editing without an editor   Editing without an editor EmptyMon Mar 15, 2010 6:11 pm

    Very long files are often hard to manipulate with a text editor. If you need to do it regularly, chances are you'll find it much faster to use some handy command-line tools instead, like in the following examples.
    To print columns eg 1 and 3 from a file file1 into file2, we can use awk:

    awk '{print $1, $3}' file1 > file2

    To output only characters from column 8 to column 15 of file1, we can use cut:

    cut -c 8-15 file1 > file2

    To replace the word word1 with the word word2 in the file file1, we can use the sed command:

    sed "s/word1/word2/g" file1 > file2

    This is often a quicker way to get results than even opening a text editor.

    An expert is a man who tells you a simple thing in a confused way in such a fashion as to make you think the confusion is your own fault. 
    Back to top Go down
    Editing without an editor
    Back to top 
    Page 1 of 1
     Similar topics
    » How to return the focus to original frame after entering text in tinymce?

    Permissions in this forum:You cannot reply to topics in this forum
    SUSEUnbound :: Help Section :: Tips and Tweaks-
    Jump to: