How To Add Text At Beginning Of File Linux Command
RegisterLogin
How To Add Text At Beginning Of File Linux Command
Post Description: this post will show you how to add text at beginning of file linux command using the linux shell command using sed you can insert and put one more line at the top of the file using whatever text you want to use
Tags: how, to, add, text, at, beginning, of, file, linux, command
This Post Was Posted On Mar 13, 2010 By Webune Support #3244
Post Description: this post will show you how to add text at beginning of file linux command using the linux shell command using sed you can insert and put one more line at the top of the file using whatever text you want to use
Tags: how, to, add, text, at, beginning, of, file, linux, command
This Post Was Posted On Mar 13, 2010 By Webune Support #3244
How To Add Text At Beginning Of File Linux Command by Webune Support
for example, i want to put on the first line a comment in my .htaccess file in my webs directory located at /var/webune/support/.htaccess
'sed -i.bak '1i #These are Webune Comments ' /var/webune/support/.htaccess
this code will create a backup copy called .htaccess.bak and also add #These are Webune Comments to the first line
hope that help and this is what you were looking for
this was tested in a Fedora,Redhat, CentOS machine
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
brandon
#3719 1
plz show me how to insert text into the beginning of a file linux
Apr 06, 2010 Reply Report abuse
aji
#3678 2
this is great sir, i am from arabia and i wanted to know how to add text to the file shell commands
Mar 30, 2010 Reply Report abuse
unix
#3667 3
i have an hp computer with unix on it, and will this shell add text to begining of a file?
Mar 30, 2010 Reply Report abuse
Leave Your Comments...
©2011 Webune Forums - Sun Dec 18, 2011 6:03 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3