Computing.Net > Forums > Linux > Editing

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Editing

Reply to Message Icon

Name: John
Date: April 8, 2002 at 20:44:02 Pacific
Comment:

is there anyway I can edit from the command line such as I have a document
where I want to delete line 16 and then replace it with something else but I just
want to do it from the command line is that possible?

John



Sponsored Link
Ads by Google

Response Number 1
Name: Jake
Date: April 8, 2002 at 20:52:36 Pacific
Reply:

you could use emacs, vi, possibly joe, or others (ed is "line-oriented"), but if this is to involve doing the same thing to many files, look into sed, awk, and even bash or perl scripting


0

Response Number 2
Name: john
Date: April 8, 2002 at 21:00:32 Pacific
Reply:

Thanks for the advice.. I can do that using vi can you give a little mor insight

John


0

Response Number 3
Name: Jake
Date: April 8, 2002 at 21:56:15 Pacific
Reply:

Do vi file, then press i to go into insert mode. ^c gets you back into command mode, where :s [enter] saves, and :q [enter] quits. Also, try :help.


0

Response Number 4
Name: Lawrence
Date: April 9, 2002 at 08:32:44 Pacific
Reply:

Or better yet, use pico since most of the
commands are displayed at the bottom of the
screen! Personally, I use vi but I've found
out that most people who don't know a whole
lot about Unix or text editing in Unix
would perfer pico...

Lawrence


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Editing

editing my user profile www.computing.net/answers/linux/editing-my-user-profile/22549.html

Edit Grub File With Mandrake www.computing.net/answers/linux/edit-grub-file-with-mandrake/24596.html

Editing fstab www.computing.net/answers/linux/editing-fstab/12631.html