Sponsored Content
Special Forums UNIX and Linux Applications GNU sed - Search and Replace problem Post 302338500 by Fishn on Tuesday 28th of July 2009 05:30:56 AM
Old 07-28-2009
Many Thanks!!

Thanks very much, it works like a dream.Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search and replace sed or tr

Hi folks, I need to search and replace specific text in a file and replace it. I have a text file that does not have any newlines or carriage returns. All newlines have been removed. Here is what I need to do. Find the exact string “DH” (quotes included) and replace it with \n”DH” (basically... (6 Replies)
Discussion started by: bridgeje
6 Replies

2. UNIX for Dummies Questions & Answers

sed search and replace

Hello Folks, Anyone know how I can replace this line in file.xml <oacore_nprocs oa_var="s_oacore_nprocs">8</oacore_nprocs> with this line <oacore_nprocs oa_var="s_oacore_nprocs">1</oacore_nprocs> using sed or awk ? Thanks for your time. Cheers, Dave (7 Replies)
Discussion started by: d__browne
7 Replies

3. UNIX for Dummies Questions & Answers

Search/Replace with Sed

Is there a way to use the sed command to 1) search a specified pattern 2) in the line where that pattern is found, replace from character N to character N+4 with a new 4-character string. Thks in advance! (5 Replies)
Discussion started by: mvalonso
5 Replies

4. Shell Programming and Scripting

Problem with sed (search/replace)

Hi, In a file FILE, the following lines appear : WORD 8 8 8 ANOTHERWORD blabla ... Directly in the prompt, if I type $sed '/WORD/s/8/10/g' FILE it replace the 8's by 10's in file : $cat FILE WORD 10 10 10 ANOTHERWORD blabla ... (9 Replies)
Discussion started by: tipi
9 Replies

5. Shell Programming and Scripting

gnu sed replace space with new line

please help in making sed singleline command i need to insert dos new line (CR LF) before " 34 matching device(s) found on \\cpu1." " 6 matching device(s) found on \\cpu7." " 102 matching device(s) found on \\mainserver." the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Discussion started by: xserg
1 Replies

6. Shell Programming and Scripting

sed search and replace

hi, im new for sed, anyone can help me to these in sed command my output file.txt "aaa",a1,bbb "ddd",a1,ccc "eee",a1,www need to change a1, to "a1"," output i need "aaa","a1","bbb "ddd","a1","ccc "eee","a1","www thanks in advance fsp (2 Replies)
Discussion started by: fspalero
2 Replies

7. OS X (Apple)

GNU Sed Problem

Hi, I'm and Android developer using Mac OSX 10.7. I use Dsixda's Android Kitchen to develop my roms. I had it working fine on 10.6.8 and it still worked flawlessly when updating to 10.7. I installed Macports, and installed some packages, and then tried to run the Android Kitchen. I CD'd to the... (3 Replies)
Discussion started by: dmeadows013
3 Replies

8. UNIX for Dummies Questions & Answers

search and replace with sed

Hi All I have a simple text file and I want to be able to replace any alpha character and comma combination with any other symbol of my choice here is the text file I want to replace: pear apple ban,ana grape ",g1234," te,st1 here is how it should look afterwards: pear... (4 Replies)
Discussion started by: greg_b
4 Replies

9. Shell Programming and Scripting

Need help with search and replace using SED

Hi guys, thanks for accepting me in your forum .. I am trying to clean some hacked PHP files using SSH .. I am using this command: find . -type f -print0 | xargs -0 sed -i '/god_mod/d' <?php ... (3 Replies)
Discussion started by: wisam74us
3 Replies

10. Shell Programming and Scripting

Large search replace using sed results in memory problem.

I have one big file of size 9GB (big_file.txt). This big file has sentences and paragraphs like any usual English document. I have another file consisting of replacement strings for sed to use. The file name is replace.sed and each entry in one line looks like this: s/\<shout\>/shout/g s/\<b is... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
TABLIX(1)						       Tablix User's Manual							 TABLIX(1)

NAME
tablix2_test - Tablix testing framework front-end SYNOPSIS
tablix2_test command options file DESCRIPTION
Tablix is a powerful free software kernel for solving general timetabling problems. It uses a coarse-grained parallel genetic algorithm in combi- nation with other techniques to construct sensible timetables from XML formatted problem descriptions. Tablix can run on a single host as well as on a heterogeneous parallel virtual machine using PVM3. Tablix testing framework provides a way to write simple automated tests that verify if a module and/or kernel is working as expected. Framework is composed of a special export module export_ttf.so and a utility program tablix2_test. Each automated test case is stored in a single file with the standard Tablix XML configuration syntax and a special XML comment block containing a short program written in Scheme. tablix2_test first processes each file containing the test case with tablix or tablix2 (depending on the detected version of the XML format) and then uses export_ttf.so module to run the Scheme code included in the same file to verify if the kernel has found a correct solution. For each test case, tablix2_test reports one of the following results: passed File contained XML syntax for the 0.2.x branch of kernels. tablix2 found a solution to the test problem and Scheme code confirmed that it is correct. passed (old syntax) File contained XML syntax for the 0.1.x branch of kernels. tablix found a solution to the test problem and Scheme code confirmed that it is cor- rect. skipped tablix or tablix2 executable was not found. Test problem was skipped. FAILED (tablix crashed) Tablix did not find a solution to the test problem. The reason can be a syntax error in the XML configuration file, an error in the module or a kernel crash. See any other displayed error messages for details. FAILED (most likely scheme syntax error) Scheme interpreter returned an error. The reason can be a syntax error or a bug in the Scheme code block. See any other displayed error messages for details. FAILED (ttf test failed) Tablix found a solution to the test problem but Scheme code did not confirm it. FAILED (unknown error) Tablix returned an unknown return value. You are probably running an outdated tablix2_test. Since tablix or tablix2 is run as part of the process, pvmd daemon must be running and be configured properly before running tablix2_test OPTIONS
tablix2_test --file ";OPTIONS" FILE Perform once a single test stored in the XML configuration file FILE. OPTIONS parameter is mandatory and contains options that will be passed to the tablix or tablix2 process. tablix2_test --dir ";OPTIONS" DIRECTORY Perform once all tests stored in XML configuration files in the directory DIRECTORY. OPTIONS parameter is mandatory and contains options that will be passed to the tablix or tablix2 process. tablix2_test --multi-file N ";OPTIONS" FILE Same as --file but performs each test N times. Test is considered passed only none of N repetitions of the test fail. tablix2_test --multi-dir N ";OPTIONS" DIRECTORY Same as --dir but performs each test in the directory N times. Test is considered passed only none of N repetitions of the test fail. EXAMPLES
To perform an exhaustive test of all kernel features and all modules in the distribution, run the following command from the top of the Tablix source tree: tablix2_test --multi-dir 7 "" ttf/tests A correctly working Tablix installation should pass all tests stored in the ttf/tests/ subdirectory except the error-1.xml, error-2.xml and error-3.xml tests which verify that the testing framework is correctly reporting errors. BUGS
tablix2_test utility depends on a number of common UNIX programs (mktemp, grep, sed, awk, ...) that may not be available on all systems. The script is not currently capable of properly detecting if any required programs are missing. AUTHOR
Tomaz Solc (tomaz.solc@tablix.org) SEE ALSO
tablix2(1), Tablix User's Manual, Tablix modules HOWTO Tomaz Solc 2005-09-03 TABLIX(1)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy