Sponsored Content
Top Forums Shell Programming and Scripting Again: Insert text below other text Post 302350060 by bobbasystem on Wednesday 2nd of September 2009 05:20:49 PM
Old 09-02-2009
Again: Insert text below other text

I need help with this please:
I have this text:

<li><a href="login.php">Ingresar</a>

and I need insert this text below:

<li><a href="http://localhost/dummysila/">anything<a></li>

help please!

Note: all this with bash....command sed I think....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

insert text into column

Hello! I have a text file containing some text : : : bla other text : : : bla any text : : : bla containing 3 columns separated by the ':' sign. Now i want to insert 'this' in the 2nd line after the 2nd column-deliminiter (i.e. into 3rd column), like some text : : : bla other text :... (1 Reply)
Discussion started by: knoxo
1 Replies

2. Shell Programming and Scripting

How to insert some constant text at beginig of each line within a text file.

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

3. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

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

4. Shell Programming and Scripting

Insert Text On file

Hi All, Can someone pls help me to insert some text on a file. my file contains something like below.. AKBULBU, BALUMIL, BATCH,BATCH BOARROB, BOTAKAT, C57896, CAKIOZE, CHECMER, CICOFRA, CISZPAW,2194485 I want output as USER_ID, LOGIN_ID (6 Replies)
Discussion started by: harshakusam
6 Replies

5. Shell Programming and Scripting

Insert text below other text

I need help in bash. This is the problem I have a php file that I edit, add a line under another. PHP file: <select name="RecPerPage" id="RecPerPage" onchange="this.form.submit();" class="phpmaker"> <option value="50">Select version</option> </select> I need insert "<option... (5 Replies)
Discussion started by: bobbasystem
5 Replies

6. Shell Programming and Scripting

How to insert text after a block of text?

Input: fstab is a configuration file that contains information of all the partitions and storage devices in your computer. The file is located under /etc, so the full path to this file is /etc/fstab. The >>>>> characters would be replaced by some texts. For example if i run a... (5 Replies)
Discussion started by: cola
5 Replies

7. Shell Programming and Scripting

Insert text using sed

sed 's/$/TEST/g' will insert TEST at the end of each line. i want to insert TEST at column 64 (7 Replies)
Discussion started by: lawsongeek
7 Replies

8. Shell Programming and Scripting

Insert value to db from text file

Hi, I have a single value in insertval file. I want to load that value to database with the current date. I tried the below code but it is inserting <NULL> to database and echo $c is also null. cat insertval | awk -F ' ' '{print $1}' > c echo c=$c data=`sqlplus -s user/pwd@hostname <<EOF ... (5 Replies)
Discussion started by: Neethu
5 Replies

9. Shell Programming and Scripting

Insert text before first 'n' lines

I want to put a particular text, say, the hash '#' before each of the first n lines of a file. How can I do that? (4 Replies)
Discussion started by: hbar
4 Replies

10. Shell Programming and Scripting

How to insert text within a file?

Hi, I am trying to check for missing dates in a file and would want to insert the missing date into the file. Currently the script is as below #!/bin/ksh dates="dates" cat ${dates} | grep -v "^#" curr_month=`date '+%m` curr_day=`date '+%d` curr_year=`date '+%Y` #curr_month=02... (7 Replies)
Discussion started by: newbie_01
7 Replies
DwtSTextReplace(3Dwt)													     DwtSTextReplace(3Dwt)

Name
       DwtSTextReplace - Replaces a portion of the current text string in the simple text widget or inserts a new substring in the text.

Syntax
       void DwtSTextReplace(widget, from_pos, to_pos, value)
	    Widget widget;
	    int from_pos, to_pos;
	    DwtCompString value;

Arguments
       widget	 Specifies the ID of the simple text widget whose text string you want to replace.

       from_pos  Specifies the beginning character position within the text string marking the text being replaced.

       to_pos	 Specifies the last character position within the text string marking the text being replaced.

       value	 Specifies the text to replace part of the current text in the simple text widget.

Description
       The  DwtSTextReplace  function  replaces  part of the text string in the simple text widget.  Within the window, the positions are numbered
       starting from 0 and increasing sequentially.  For example, to replace the second and third characters in the string, from_pos should  be  1
       and to_pos should be 3.	To insert a string after the fourth character, from_pos and to_pos should both be 4.

See Also
       DwtSText(3Dwt),  DwtSTextGetString(3Dwt),  DwtSTextGetEditable(3Dwt),  DwtSTextSetEditable(3Dwt), DwtSTextGetMaxLength(3Dwt), DwtS-
       TextSetMaxLength(3Dwt), DwtSTextSetSelection(3Dwt), DwtSTextClearSelection(3Dwt), DwtSTextGetSelection(3Dwt)
       Guide to the XUI Toolkit: C Language Binding
       Guide to the XUI Toolkit Intrinsics: C Language Binding

															     DwtSTextReplace(3Dwt)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy