06-02-2011
Tell me if my undestanding is correct,
For ex I1=12,I2=23,I3=34,I4=45,I5=56 is the key.
When the pattern with N-N-N-N-N is found
do you want to replace it with I1-I2-I3-I4-I5?
or First matching pattern should be replace with I1-I1-I1-I1-I1, then with I2-I2-I2-I2-I2 and so on..
This User Gave Thanks to getmmg For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have 2 sets of text files. I need to take a field from a certain line in set 1 and put it in the same place in set b. The line appears once per file, in different places but is a set format and has the unique word "ANTENNA" in it and is always 81 characters long. Example from set a:
... (7 Replies)
Discussion started by: Jonny2Vests
7 Replies
2. Shell Programming and Scripting
Hi experts,
I have the file with these lines:
var1=thu_13:12:32,var2=Microsoft,var3=240ms,var4=Mozilla/4.0_(sun;_MSIR_3-4;_windows.;_NET_1.1323.53
var1=thu_13:13:32,var2=Microsoft,var3=213ms,var4=Mozilla/4.0_(sun;_MSIR_3-4;_windows.;_NET_1.1323.53... (9 Replies)
Discussion started by: lalelle
9 Replies
3. Shell Programming and Scripting
Hi,
Im trying to update some properties files with text from another file:
file1
user=xyz
file2
user=
after script
file2
user=xyz
Im using this reading the $QUARTZURL,ETC... from quartz.properties:
echo... (1 Reply)
Discussion started by: mc1392
1 Replies
4. Shell Programming and Scripting
Hi all
I have two files X.txt and Y.txt. The file format of X.txt is :
madras is also the fountainhead of the theosophical movement which spread worldwide .
and second file Y.txt is of the format:
madra|s|nsubj is|cop also|advmod the|det fountainhead|empty of|prep the|det... (3 Replies)
Discussion started by: my_Perl
3 Replies
5. Shell Programming and Scripting
Can someone help me? I been figuring out how I can search and extract a complicated search string from a file. The whole string is delimited by a period. And the file where I'm searching is composed of differnt string such as that. For example, I have this search string:
and I have a file... (3 Replies)
Discussion started by: Orbix
3 Replies
6. Shell Programming and Scripting
Hello all,
This is my first post and I hope you can help me out.
I searched for quite some hours now and haven't found a simple solution to my problem.
It is as following:
I got this file:
dl.dropbox.com/u/14586156/stuff/Bookmarks.plist
and want to replace the Text between... (9 Replies)
Discussion started by: pasc
9 Replies
7. Shell Programming and Scripting
Hi,
We have a file (e.g. a .csv file, but could be any other format), with 2 columns: the old value and the new value. We need to modify all the files within the current directory (including subdirectories), so find and replace the contents found in the first column within the file, with the... (9 Replies)
Discussion started by: Talkabout
9 Replies
8. Shell Programming and Scripting
Hallo Everyone.
I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text.
I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern>
... (5 Replies)
Discussion started by: gordom
5 Replies
9. Shell Programming and Scripting
i'm trying to figure out the easiest way to replace a string:
pineapple pineapple-reg
basketball basketball-reg
football foot-reg-ball
i'm storing the above in a file called wordstoreplace.txt
for each line above, the word in the first column is to be replaced by the word in the second... (4 Replies)
Discussion started by: SkySmart
4 Replies
10. Shell Programming and Scripting
I am working with a log file that I am trying to clean up by removing non-English ASCII characters. I am using Bash via Cygwin on Windows.
Before I start I set:
export LC_ALL=C
I clean it up by removing all non-English ASCII characters with the following command;
grep -v $''... (4 Replies)
Discussion started by: lewk
4 Replies
LEARN ABOUT REDHAT
profiler
profiler(n) Tcl Profiler profiler(n)
NAME
profiler - Tcl source code profiler
SYNOPSIS
package require Tcl 8.3
package require profiler ?0.2?
::profiler::init
::profiler::dump pattern
::profiler::print ?pattern?
::profiler::reset
::profiler::suspend ?pattern?
::profiler::resume ?pattern?
::profiler::sortFunctions key
DESCRIPTION
The profiler package provides a simple Tcl source code profiler. It is a function-level profiler; that is, it collects only function-level
information, not the more detailed line-level information. It operates by redefining the Tcl proc command. Profiling is initiated via the
::profiler::init command.
COMMANDS
::profiler::init
Initiate profiling. All procedures created after this command is called will be profiled. To profile an entire application, this
command must be called before any other commands.
::profiler::dump pattern
Dump profiling information for the all functions matching pattern. If no pattern is specified, information for all functions will
be returned. The result is a list of key/value pairs that maps function names to information about that function. The information
about each function is in turn a list of key/value pairs. The keys used and their values are:
totalCalls
The total number of times functionName was called.
callerDist
A list of key/value pairs mapping each calling function that called functionName to the number of times it called function-
Name.
compileTime
The runtime, in clock clicks, of functionName the first time that it was called.
totalRuntime
The sum of the runtimes of all calls of functionName.
averageRuntime
Average runtime of functionName.
descendantTime
Sum of the time spent in descendants of functionName.
averageDescendantTime
Average time spent in descendants of functionName.
::profiler::print ?pattern?
Print profiling information for all functions matching pattern. If no pattern is specified, information about all functions will be
displayed. The return result is a human readable display of the profiling information.
::profiler::reset
Reset profiling information for all functions matching pattern. If no pattern is specified, information will be reset for all func-
tions.
::profiler::suspend ?pattern?
Suspend profiling for all functions matching pattern. If no pattern is specified, profiling will be suspended for all functions. It
stops gathering profiling information after this command is issued. However, it does not erase any profiling information that has
been gathered previously. Use resume command to re-enable profiling.
::profiler::resume ?pattern?
Resume profiling for all functions matching pattern. If no pattern is specified, profiling will be resumed for all functions. This
command should be invoked after suspending the profiler in the code.
::profiler::sortFunctions key
Return a list of functions sorted by a particular profiling statistic. Supported values for key are: calls, exclusiveTime, compile-
Time, nonCompileTime, totalRuntime, avgExclusiveTime, and avgRuntime. The return result is a list of lists, where each sublist con-
sists of a function name and the value of key for that function.
KEYWORDS
profile, performance, speed
profiler 0.2 profiler(n)