•
•
•
•
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
![]() |
•
•
Join Date: Nov 2007
Posts: 91
Reputation:
Rep Power: 1
Solved Threads: 0
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
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
•
•
Join Date: Oct 2007
Posts: 247
Reputation:
Rep Power: 1
Solved Threads: 26
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
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!
------------------------------------------------------------------------
Having trouble passing cert exams? Check out How To Pass Any Computer Certification Test!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
Similar Threads
- Apache Alias Directive... mod_alias question (Linux Servers and Apache)
- Completely new to C++ and have question about using char (C++)
- Question (Geeks' Lounge)
- question on cooling (Cases, Fans and Power Supplies)
- C command-line I/O question (C++)
- Context-sensitive grammar question :( (Computer Science and Software Design)
- Welcome PC Mod Kingdom peeps! (Geeks' Lounge)
- Laptop LCD built into a car? (Monitors, Displays and Video Cards)
- Changing Network Configuration (*nix Software)
Other Threads in the Shell Scripting Forum
- Previous Thread: exit (0)
- Next Thread: How to delete last three lines in file


Linear Mode