The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
How do I insert a line in the middle of a file in BASH?
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How do I insert a line in the middle of a file in BASH?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
10-08-2008
phenom
Registered User
Join Date: Oct 2008
Posts: 3
How do I insert a line in the middle of a file in BASH?
I have tried
sed
'/6/a text_to_inserted' file > newfile
but this inserts test_to_insert at random places in file and i want it in specific location, which is line 6.
can anyone help....
phenom
View Public Profile
Find all posts by phenom
Find phenom's past nominations received
Find phenom's present nominations given