07-06-2008
Quote:
Originally Posted by
dzufauzan
Could you give me complete code?
im newbie
. Thx
If your initial code works as you describe, you should be able to get away with simply replacing the "for i in *" line with the line given above.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
I need to search and replace in multiple files that are in directory hierarchy
Im using the :
find . -name "*.dsp" -print | xargs grep -n -o Test.lib" , I like to be able to replace every instance of Test.lib
with empty space .
how can I write one liner that does this ? (3 Replies)
Discussion started by: umen
3 Replies
2. Shell Programming and Scripting
I would like to know code that will delete multiple text from a comma delimited file. For example, how would the comma delimited file below delete the word 'PEST' in Perl language (previously an excel file that was converted to a csv and the last column was PEST):
1, 2,43,34, bosx,PEST
1,... (1 Reply)
Discussion started by: dolo21taf
1 Replies
3. Shell Programming and Scripting
Ok guys,
If anyone could help me out on this puppy I'd be very appreciative!
Here's the scenario
I have a string for example :
<img src=BLANK_IMG border=0 width=221 height=12>
or
<img src=IMG border=0 height=12 width=221 >
or anything else really....
need to basically change each... (10 Replies)
Discussion started by: Tonka52
10 Replies
4. Shell Programming and Scripting
Dear all
My task is to replace a strings in multiple files.
filename: file1
I can use sed to replace abc.server.com to unix.server.org
e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1
I have 2 questions. How do I
directly save file1 instead of append to newfile1. I... (1 Reply)
Discussion started by: on9west
1 Replies
5. UNIX for Dummies Questions & Answers
I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that?
The closest I've come is
grep -rl "text" * | sed -e 's/home1/home2/g'
but that just replaces the filename. (2 Replies)
Discussion started by: dhinge
2 Replies
6. Shell Programming and Scripting
I need to replace (delete) a text block in a bunch of files, its a html table, almost at the end of pages but the location varies.
In Windows I used Filemonkey, but nothing like that in Unix?
There is replace from mysql, but how does it deal with newlines?
sed only works with single lines,... (6 Replies)
Discussion started by: eiland
6 Replies
7. Shell Programming and Scripting
can anyone please help me in the below scenario:
File1:
Hello1
Hello1
i want to use sed to replace multiple occurances of Hello1 in file 1 to welcome.
Thanks a ton for the help (9 Replies)
Discussion started by: amithkhandakar
9 Replies
8. Shell Programming and Scripting
I need to update about 2400 files in a directory subtree, with a new directory path inside the files
I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2
with this: /u01/PROD/apps/apps_st/10.1.3
I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies
9. Shell Programming and Scripting
I need help.
I have to delete multiple directories inside a directory that are two weeks old.
Example: Today is July 09, 2012
Folder1 > folder1 (created June 4, 2012) -- should be deleted
> folder2 (created June 2, 2012) -- should be deleted
> folder3 (created... (4 Replies)
Discussion started by: jasperux
4 Replies
10. Shell Programming and Scripting
Hi,
I have a file containing list of strings like
i:
Pink
Yellow
Green
and I have file having list of file names in a directory
j :
a
b
c
d
Where j contains of a ,b,c,d are as follows
a:
Pink (3 Replies)
Discussion started by: madabhg
3 Replies
LEARN ABOUT OSF1
dxmcreatescrolledcstext
DXmCreateScrolledCSText(3X) DXmCreateScrolledCSText(3X)
NAME
DXmCreateScrolledCSText - Creates a compound string text widget with scroll bars.
SYNOPSIS
Widget DXmCreateScrolledCSText(
Widget parent,
char *name,
Args *args,
Cardinal num_args );
PARAMETERS
The identifier (widget ID) of the parent widget. The name of the created widget. The application override argument list. The number of
arguments in the application override argument list.
DESCRIPTION
The DXmCreateScrolledCSText routine creates a compound string text widget with scroll bars. The routine uses the same arguments and
resources as the DXmCreateCSText routine to create a compound string text widget but uses the following resources to create horizontal and
vertical scroll bars for the widget as well:
-------------------------------------------------------------------
Resource Description
-------------------------------------------------------------------
XmNscrollHorizontal Controls whether a scroll bar that allows
the user to scroll through text horizontally
is added to the compound string text window.
XmNscrollTopSide Controls whether the horizontal scroll bar
is positioned at the top of the compound
string text window.
XmNscrollVertical Controls whether a scroll bar that allows
the user to scroll through text vertically
is added to the compound string text window.
XmNscrollLeftSide Controls whether the vertical scroll bar is
placed on the left side of the compound
string text window.
-------------------------------------------------------------------
Inherited Resources
The DXmCreateScrolledCSText routine inherits behaviour and resources from the following superclasses:
Core Resource Set XmPrimitive Resource Set DXmScrolledCSText Resource Set
RETURN VALUES
The identifier (widget ID) of the created compound string text widget.
SEE ALSO
DXmCreateCSText(3X)
DXmCreateScrolledCSText(3X)