Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
hello,
I have a file that has lines with different lengts. I want this file to be filled up with a zero so that al the lines have the same length.
Please advice?
File 1:
-----------
2310
2009
830
1345
Result
File 2:
----------
2310
2009
0830 (3 Replies)
Hi, all.
I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file:
10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783
19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657
And this is the expected... (2 Replies)
Need a script that manipulates a fixed length file that will compare 2 fields in that file and if they are equal write that line to a new file.
i.e. If fields 87-93 = fields 119-125, then write the entire line to a new file. Do this for every line in the file. After we get only the fields... (1 Reply)
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Hi Team,
I have an issue to split the file which is having special chracter(German Char) using awk command.
I have a different length records in a file. I am separating the files based on the length using awk command.
The command is working fine if the record is not having any... (7 Replies)
Hi ,
I am having a scenario where I need to split the file based on two field values. The file is a fixed length file.
ex:
AA0998703000000000000190510095350019500010005101980301
K 0998703000000000000190510095351019500020005101480 ... (4 Replies)
Discussion started by: saj
4 Replies
LEARN ABOUT OSX
test::harness::results
Test::Harness::Results(3pm) Perl Programmers Reference Guide Test::Harness::Results(3pm)NAME
Test::Harness::Results - object for tracking results from a single test file
SYNOPSIS
One Test::Harness::Results object represents the results from one test file getting analyzed.
CONSTRUCTION
new()
my $results = new Test::Harness::Results;
Create a test point object. Typically, however, you'll not create one yourself, but access a Results object returned to you by
Test::Harness::Results.
ACCESSORS
The following data points are defined:
passing true if the whole test is considered a pass
(or skipped), false if its a failure
exit the exit code of the test run, if from a file
wait the wait code of the test run, if from a file
max total tests which should have been run
seen total tests actually seen
skip_all if the whole test was skipped, this will
contain the reason.
ok number of tests which passed
(including todo and skips)
todo number of todo tests seen
bonus number of todo tests which
unexpectedly passed
skip number of tests skipped
So a successful test should have max == seen == ok.
There is one final item, the details.
details an array ref reporting the result of
each test looks like this:
$results{details}[$test_num - 1] =
{ ok => is the test considered ok?
actual_ok => did it literally say 'ok'?
name => name of the test (if any)
diagnostics => test diagnostics (if any)
type => 'skip' or 'todo' (if any)
reason => reason for the above (if any)
};
Element 0 of the details is test #1. I tried it with element 1 being #1 and 0 being empty, this is less awkward.
Each of the following fields has a getter and setter method.
o wait
o exit
perl v5.10.0 2007-12-18 Test::Harness::Results(3pm)