08-18-2005
Thanks a loooooot!!!!!
My problem have been solved....
The Solution Suggested by Unbeliever is working fine....
When I tried with the solution by jerardfjay , it gives me the following error : Segmentation fault(coredump) .. Could you please tell me why ? I am using AIX 5.
The solution with sed by reborg is also working fine.. but it fails , if more that one \n is there in a single line. It appends the first with second..and so on... any way could you please explain the code.. if you don't mind
Thanks once again
Shihab
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to put the single line contents of a file into a variable, but remove the last character, for example the file would have this sort of contents:
2;4;3;10;67;54;96;
And I want the variable to be:
2;4;3;10;67;54;96 (notice the last ";" has gone).
Unfortunately I can't just... (4 Replies)
Discussion started by: danhodges99
4 Replies
2. UNIX for Dummies Questions & Answers
Here is a sample code
grep '903' -i user.txt | tail -2 | awk '{print $2}' | sed 's/B//g'
the input file has data as such
903-xxx-xxxxB
903-xxx-xxxxB
It is a dialer file i want to remove the "B"
any help thanks (5 Replies)
Discussion started by: Iz3k34l
5 Replies
3. Shell Programming and Scripting
Hello Experts,
I have a file "tt.txt" which is like:
#a1=a2
b1=b2
#c1=c2
I need to remove the pound (#) sign from a particular line. In this case let us assume it's 3rd line : "#c1=c2"
I can do it through:
sed "s/#c1=c2/c1=c2/" tt.txtbut it is possible that I may not know the value... (6 Replies)
Discussion started by: hkansal
6 Replies
4. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
5. Shell Programming and Scripting
Hi everyone,
I'm very new to using sed, run through some tutorials and everything but I've hit a problem that I'm unable to solve by myself.
I need to remove all linefeeds that are followed by a particular character (in this case a semicolon). So basically, all lines starting with a semicolon... (5 Replies)
Discussion started by: fluffdasheep
5 Replies
6. Shell Programming and Scripting
Hi,
I have a file with lines such as the below. I want to remove the comma only if it is the first character on a line. I can't work out how to do this using sed.
*ELSET, ELSET=WHEEL_TD2
63, 64, 65, 72, 82, 88, 89, 92, 120, 121, 152, 181, 190, 221, 252, 259
, 260, 282, 283, 285, 286,... (2 Replies)
Discussion started by: carlr
2 Replies
7. Shell Programming and Scripting
Good afternoon:
im working wih 2 files to find differences and use the cmp command
cmp file1 file2
file1 file2 are are diifferent char 302 line1
i found what the difference is with the sed command and that is the file1 at the end of every line has a (,) (comma) character.
i.e
sed -n... (4 Replies)
Discussion started by: alexcol
4 Replies
8. UNIX for Dummies Questions & Answers
Hi guys,
Does anyone know how to remove the last character in each of the line?
This is what I have:
ABCDE.1
GLSJD.2
HIJPL.2
HKAGB.3
IUBWQ.1
What I want (remove the dot and number):
ABCDE
GLSJD
HIJPL
HKAGB
IUBWQ
I tried to use this: sed 's/.*//'
But I'm not sure if that is... (3 Replies)
Discussion started by: narachaid
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Could any one suggest how to remove $ symbol in a text file when i am opening in vi editor.
Scenario;
For example iam having a file name aaa.txt the data inside the file is like
sample
name
when i am opening in vi editor
The same file resembles like below when i am... (1 Reply)
Discussion started by: Chandru_Raj
1 Replies
10. Shell Programming and Scripting
Hi,
I am a newbie to shell scripting (.sh). Please guide me on how to do the below issue.
My input file has below data.
I want to remove $ sysmbol from the fourth column of each line. (ie, between 4th and 5th pipe symbol)
ABC25160|51497|06/02/2010|$32,192.07|MARK|$100|A... (3 Replies)
Discussion started by: rsreejithmenon
3 Replies
LEARN ABOUT DEBIAN
tablix2_test
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)