To KevinADC: I don't understand why you said "the file is opened for reading not for writing". I thought the ">" symbol means write to file, isn't it?. You confused me there.
To Tyler: Your perl line is brilliant. That's exactly what I'm looking for but I'd rather do that in a Perl script. I'm long way from writing Perl liners.
Hi,
I'm a newbee to Unix shell scripting.
I want to write a shell script that inserts a new String(name&value pair) into a file(s) at a particular place.I willl have to write one script which when executed should insert a new variable in all the files in that particular directory.
Say for eg:... (4 Replies)
Dear all,
I have a file created in the name sample.txt in UNIX with header and footer. How to insert a required string (for example "FILE1") in the header part after the file has been created. What kind of command can i use to do the same.
Thanks in advance
Hari (3 Replies)
:confused:Dears ,
I have text file I need to insert the subscriber number at position 32, and need to keep the next field at position 53 (no increasing of the record lenght), I mean I just want to replace the spaces at position 32 with subscirber number .
for example
A B
A ... (1 Reply)
I am in a dire need of doing this job , please help from shell script or perl script. It will be highly appreciated.
Please have a look at the following INPUT file;
The first 14 rows are not of interest but I want them to be included in the output file as they are. From the row 14... (3 Replies)
I have a tab delimited text file with multiple columns (data.txt). I would like to insert a column into the text file. The column I want to insert is in a text file (column.txt). I want to insert it into the 5th column of data.txt. How do I go about doing that? Thanks! (2 Replies)
Hi all,
I want to create a file and then insert some text into it. I'm trying to create a .sh script that will create a new python file from a template.
Can someone tell me why this won't work,
touch $1 | sed -e '1i\Some test code here'
Sorry I'm quite new to all this!
Just as a side... (3 Replies)
I need to insert text from one file into another file after specific term. I guess sed is the best method of doing this and I can insert a specified text string using this script but I am not sure how to modify it to insert text from another file:
#!/bin/sh
sed 's/\<VirtualHost... (17 Replies)
Hello,
I've been trying to get a script working that fetches weather-data and converts it into an .ics file. The script works so far put I'm stuck at the point where I need to add specific static data. A thorough search through the forum did not point me into the right direction.
#!/bin/bash... (3 Replies)
I'm trying to find a Bourne shell script that will copy files from one directory using a wild card for the file name (*) and add some more characters in the middle of the file name as it is copied. As an example:
/u01/tmp-file1.xml => /u02/tmp-file1-20130620.xml
/u01/tmp-file2.xml => ... (6 Replies)
Hello, I'm trying to take information from a list of hundreds of subject ids (where each line is a new subject id), and insert each line into a new text file that contains the pathnames for each subject.
To clarify, all subject have a similiar path name (e.g., C:\data\SUBJECT_ID\) that contains... (4 Replies)
Discussion started by: invisibledwarf
4 Replies
LEARN ABOUT ULTRIX
dwtcstextreplace
DwtCSTextReplace(3Dwt)DwtCSTextReplace(3Dwt)Name
DwtCSTextReplace - Replaces a portion of the current text in the compound-string text widget or inserts some new text into the current text
of the compound-string text widget.
Syntax
void DwtCSTextReplace(widget, from_pos, to_pos, value)
Widget widget;
int from_pos, to_pos;
DwtCompString value;
Arguments
widget Specifies the ID of the compound-string text widget.
from_pos Specifies the first character position of the compound-string text being replaced.
to_pos Specifies the last character position of the compound-string text being replaced.
value Specifies the text to replace part of the current text in the compound-string text widget.
Description
The DwtCSTextReplace function replaces part of the text in the compound-string text widget. Within the widget, positions are numbered
starting at 0 and increasing sequentially. For example, to replace the second and third characters in the text, from_pos should be 1 and
to_pos should be 3. To insert text after the fourth character, from_pos and to_pos should both be 4.
See AlsoDwtCSText(3Dwt), DwtCSTextCreate(3Dwt), DwtCSTextSetString(3Dwt), DwtCSTextGetEditable(3Dwt), DwtCSTextSetEditable(3Dwt), DwtCS-
TextGetMaxLength(3Dwt), DwtCSTextSetMaxLength(3Dwt), DwtCSTextSetSelection(3Dwt), DwtCSTextGetSelection(3Dwt)
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
DwtCSTextReplace(3Dwt)