10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to insert "Text" in each file as a place where I mentioned below "Insert Text Here". These files are something like news of newspaper. Generally, newspaper headlines contain one or two lines.
I don't know how it can be identified whether Text is inserted after first line or second line.
... (10 Replies)
Discussion started by: imranrasheedamu
10 Replies
2. Shell Programming and Scripting
Hello, I am trying to insert a section of text between lines in another text file.
The new lines to be inserted are:
abcd.efgh.zzzz=blah
abcd.efgh.xxxx=blah
Where N = 0 to 2
Original File:
abcd.efgh.wwxx=aaaaa
abcd.efgh.yyzz=bbbbb
abcd.efgh.wwxx=aaaaa
abcd.efgh.yyzz=bbbbb... (3 Replies)
Discussion started by: tsu3000
3 Replies
3. Shell Programming and Scripting
Hi!
Considering below text, how would I use sed to insert text right below the v0005-line, using the SEPARATOR-line as a pattern to search for, so two lines above the separator? I can do it right above the separator, but not 2 lines...
# v0004 - Some text
# v0005 - More text
#... (5 Replies)
Discussion started by: indo1144
5 Replies
4. Shell Programming and Scripting
Hi
I am trying to insert a block of text 2 lines above a pattern match using sed
eg
#Start of file entry
{
}
#End of file entry
new bit of text has to be put in just above the } eg
#Start of file entry
{
New bit of text
}
#End of file entry (7 Replies)
Discussion started by: eeisken
7 Replies
5. Shell Programming and Scripting
Hi,
I am new to unix. I need to insert a variable which contains some lines of text into a text file after fixed number of lines..
Please help me on this..
Thanks in Advance,
Amrutha (3 Replies)
Discussion started by: amr89
3 Replies
6. Shell Programming and Scripting
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies
7. UNIX for Dummies Questions & Answers
I need help on how I can accomplish my task. I hope someone can help me since I've researching and trying to accomplish this for hours now. Basically, I need to comment-out (or insert a # sign in the beginning of the line) a line when the line has the specific word I am searching. Example I have... (3 Replies)
Discussion started by: Orbix
3 Replies
8. Shell Programming and Scripting
Hi ,
I need some inputs on how to open a file (file.txt) and parse the text example aaa of the file and bbb of the file and add the text zzzz once i parse (aaa and bbb) and followed by the remaining of the text as it is in the file using perl programming.
Thanks in advance (3 Replies)
Discussion started by: madhul2002
3 Replies
9. Shell Programming and Scripting
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies
10. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies