User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 375,207 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,300 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:
Views: 377 | Replies: 1
Reply
Join Date: Nov 2007
Posts: 91
Reputation: k2k is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
k2k k2k is offline Offline
Junior Poster in Training

ed question

  #1  
May 16th, 2008
can anybody please give some quick reference in how to insert characters or line of characters to a file... and how to exit the insert mode in the regular expression.

ex:
ed try.txt
1,$p -->prints everything
how do i get in to the insert mode ? " i " ???
then... how do i insert characters to this file?
then... how do i exit insert mode

thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 247
Reputation: eggi is on a distinguished road 
Rep Power: 1
Solved Threads: 26
eggi eggi is offline Offline
Posting Whiz in Training

Re: ed question

  #2  
May 16th, 2008
Hey There,

Check this page for all the options:

http://linux.about.com/library/cmd/blcmdl1_ed.htm

As for the insert mode, it's the same as vi. i will put you in insert mode at the position you are, and "a" will put you in insert mode right after your position in the file. You can exit insert by doing a ctl-c or any interrupt signal.

Best wishes,

Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
Having trouble passing cert exams? Check out How To Pass Any Computer Certification Test!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Shell Scripting Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 2:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC