Sponsored Content
Top Forums Shell Programming and Scripting Perl - Enter text in a file in a place. Post 302299685 by KevinADC on Friday 20th of March 2009 08:54:51 PM
Old 03-20-2009
You don't need a regexp you just need to find the first line using index() or "eq" then print the line you want to go after that line. When you post some code you have written to try and solve this requirement I will help you some more.

Two approaches are using the Tie::File module that comes with perl or perls inplace editor.
 

10 More Discussions You Might Find Interesting

1. Programming

Can i ask the question of perl in the place?

Who can tell me what's link in https://www.unix.com web can ask some question about perl? (2 Replies)
Discussion started by: ybz3721
2 Replies

2. Shell Programming and Scripting

Enter text and display on logo

Okay, lets say I have a entry field, to enter the persons name. Then I have a image of a car, and when the person hits submit on the form , the image loads and the name the person entered is displayed on the door or the car. How would I do this in a browser.could someone give me a Javascript or... (1 Reply)
Discussion started by: perleo
1 Replies

3. Shell Programming and Scripting

How to get awk to edit in place and join all lines in text file

Hi, I lack the utter fundamentals on how to craft an awk script. I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies

4. Shell Programming and Scripting

Inserting text into a file but searching for the place to put it!

Hi I would love a bit of help with a problem im having with a script. I need to insert a line of text which is saved in a variable called $fwInsert into a file whos name is saved in a variable called $server but it needs to be in a certain order. The file is a forward file for a network and... (12 Replies)
Discussion started by: KatieV
12 Replies

5. Shell Programming and Scripting

Cut text file in place

I have a file that i want to take only the first part of it and discard the rest, to be accurate,I need the first 137097 lines but I cant use split because I dont have enough space on my disck. I need sth to cut the file in its place (3 Replies)
Discussion started by: Heidi Heweidy
3 Replies

6. Shell Programming and Scripting

Loop logic, enter into respective IF as per enter input file name

have three big data file, however I just need to see the mentioned below one line form the all the file which has SERVER_CONNECTION Value File 1 export SERVER_CONNECTION=//dvlna002:10001/SmartServer File2 export SERVER_CONNECTION=///SmartServer File3 export... (1 Reply)
Discussion started by: Nsharma3006
1 Replies

7. Shell Programming and Scripting

View on screen text file and enter input

Is the below correct syntax for if the user enters something other than "GJB2 or MECP2, or PHOX2B", then they are shown on the screen format.txt and allowed to enter in one of those formats? Thank you :). Basically, the user can see which formats are allowed and enter a variant while viewing... (7 Replies)
Discussion started by: cmccabe
7 Replies

8. UNIX for Dummies Questions & Answers

How to enter special characters in a text file using vi?

Hi, I need to create a test text file with the special characters \342\200\223 in it and to be able to use sed maybe to delete them I tried doing it using vi by pressing CTRL-V and then typing 342 but it does not work. After pressing CTRL-V and typing 342 it seems to just insert the numbers... (1 Reply)
Discussion started by: newbie_01
1 Replies

9. Shell Programming and Scripting

awk to place specific contents filename within text file

I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
Discussion started by: cmccabe
10 Replies

10. Shell Programming and Scripting

Modifying text file records, find data in one place in the record and print it elsewhere

Hello, I have some text data that is in the form of multi-line records. Each record ends with the string $$$$ and the next record starts on the next line. RDKit 2D 15 14 0 0 0 0 0 0 0 0999 V2000 5.4596 2.1267 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 ... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
DwtSTextSetString(3Dwt) 												   DwtSTextSetString(3Dwt)

Name
       DwtSTextSetString - Sets the text string in the simple text widget.

Syntax
       void DwtSTextSetString(widget, value)
	    Widget widget;
	    char *value;

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

       value	 Specifies the text that replaces all text in the current text widget window.

Description
       The DwtSTextSetString function completely changes the string in the simple text widget.

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

															   DwtSTextSetString(3Dwt)
All times are GMT -4. The time now is 03:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy