Re: Looking for quick way of editing a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gilboa Davara wrote:

On Sun, 2005-11-20 at 13:36 +0000, Paul Smith wrote:
Dear All

Is there some quick way of editing a specific line of a text file
without using a text editor?

Thanks in advance,

Paul


Try tr(1), sed(1) and awk(1).

To replace a single line (or part of it):
cat file.txt | sed 's/old_line/new_line/g' > newfile.txt

Gilboa

nano is an easy and quick editor. The commands are simple, ^o to write out and ^x to quit. The program is installed by default.

Jim

--
The goal of Computer Science is to build something that will last at
least until we've finished building it.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux