Hi Unix Champs,
I want to awk on a fixed length file.
Instead if the file was a delimited file, then I could have used -F and then could have easily done manipulation on the fields.
How do i do the same in case of fixed length file?
Thanks in Advance.
Regards. (7 Replies)
I would like to make a script to read three variables (no fixed length or position) from a line and write them into a file, with fixed length and right-justified in each column. The fixed text (text1-text4) prior to the thee variables and the variables themselves are originally separated by spaces... (3 Replies)
OK I am somewhat new to UNIX programming please see what you can do to help.
I have a flat file that is a fixed length file containing different records based on the 1st character of each line. The 1st number at the beginning of the line is the record number, in this case it's record #1.
I... (3 Replies)
Hi to All,
Would you please help me.
I have a issue like in fixed format file there are 80 words should be there. but if file contains greater than 80 words then creates problem. so i have to trim file having more than 80 characters line through unix shell scripting. Please let me know how... (2 Replies)
Hi Gurus,
Thanks in advance...
I am new to writing shell scripting and help me out reading a flat file with fixed length.
I have a fixed length flat file with storename(lenth 6) , emailaddress(lenth 15), location(10). There is NO delimiters in that file.
Like the following str00001.txt... (2 Replies)
Hi,
I need to split a fixed length file of 160 characters based on value of a column. Example:
ABC 456780001 DGDG SDFSF
BCD 444440002 SSSS TTTTT
ABC 777750003 HHHH UUUUU
THH 888880001 FFFF LLLLLL
HHH 999990002 GGGG OOOOO
I need to split this file on basis of column from... (7 Replies)
I have 2 fixed length files input#1 & input#2. I want to match the rows based on the value in position 37-50 in both files (pos 37-50 will have same value in both files).
If any matching record is found then cut the value against company code & Invoice number from input file #1 (position 99 until... (3 Replies)
All,
I used to use following command to replace specific location in a fixed width file.
Recently looks like my command stopped working as intended. We are on AIX unix.
awk 'function repl(s,f,t,v)
{ return substr(s,1,f-1) sprintf("%-*s", t-f+1, v) substr(s,t+1) }
NR<=10 {... (3 Replies)
Discussion started by: pinnacle
3 Replies
LEARN ABOUT OSX
perlqnx5.12
PERLQNX(1) Perl Programmers Reference Guide PERLQNX(1)NAME
README.qnx - Perl version 5 on QNX
DESCRIPTION
As of perl5.7.2 all tests pass under:
QNX 4.24G
Watcom 10.6 with Beta/970211.wcc.update.tar.F
socket3r.lib Nov21 1996.
As of perl5.8.1 there is at least one test still failing.
Some tests may complain under known circumstances.
See below and hints/qnx.sh for more information.
Under QNX 6.2.0 there are still a few tests which fail. See below and hints/qnx.sh for more information.
Required Software for Compiling Perl on QNX4
As with many unix ports, this one depends on a few "standard" unix utilities which are not necessarily standard for QNX4.
/bin/sh
This is used heavily by Configure and then by perl itself. QNX4's version is fine, but Configure will choke on the 16-bit version, so
if you are running QNX 4.22, link /bin/sh to /bin32/ksh
ar This is the standard unix library builder. We use wlib. With Watcom 10.6, when wlib is linked as "ar", it behaves like ar and all is
fine. Under 9.5, a cover is required. One is included in ../qnx
nm This is used (optionally) by configure to list the contents of libraries. I will generate a cover function on the fly in the UU
directory.
cpp Configure and perl need a way to invoke a C preprocessor. I have created a simple cover for cc which does the right thing. Without
this, Configure will create its own wrapper which works, but it doesn't handle some of the command line arguments that perl will throw
at it.
make
You really need GNU make to compile this. GNU make ships by default with QNX 4.23, but you can get it from quics for earlier versions.
Outstanding Issues with Perl on QNX4
There is no support for dynamically linked libraries in QNX4.
If you wish to compile with the Socket extension, you need to have the TCP/IP toolkit, and you need to make sure that -lsocket locates the
correct copy of socket3r.lib. Beware that the Watcom compiler ships with a stub version of socket3r.lib which has very little
functionality. Also beware the order in which wlink searches directories for libraries. You may have /usr/lib/socket3r.lib pointing to the
correct library, but wlink may pick up /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure they both point to the correct library,
that is, /usr/tcptk/current/usr/lib/socket3r.lib.
The following tests may report errors under QNX4:
cpan/Cwd/Cwd.t will complain if `pwd` and cwd don't give the same results. cwd calls `fullpath -t`, so if you cd `fullpath -t` before
running the test, it will pass.
lib/File/Find/taint.t will complain if '.' is in your PATH. The PATH test is triggered because cwd calls `fullpath -t`.
ext/IO/lib/IO/t/io_sock.t: Subtests 14 and 22 are skipped due to the fact that the functionality to read back the non-blocking status of a
socket is not implemented in QNX's TCP/IP. This has been reported to QNX and it may work with later versions of TCP/IP.
t/io/tell.t: Subtest 27 is failing. We are still investigating.
QNX auxiliary files
The files in the "qnx" directory are:
qnx/ar
A script that emulates the standard unix archive (aka library) utility. Under Watcom 10.6, ar is linked to wlib and provides the
expected interface. With Watcom 9.5, a cover function is required. This one is fairly crude but has proved adequate for compiling perl.
qnx/cpp
A script that provides C preprocessing functionality. Configure can generate a similar cover, but it doesn't handle all the command-
line options that perl throws at it. This might be reasonably placed in /usr/local/bin.
Outstanding issues with perl under QNX6
The following tests are still failing for Perl 5.8.1 under QNX 6.2.0:
op/sprintf.........................FAILED at test 91
lib/Benchmark......................FAILED at test 26
This is due to a bug in the C library's printf routine. printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires '0.000000e+00'. QNX
has acknowledged the bug.
AUTHOR
Norton T. Allen (allen@huarp.harvard.edu)
perl v5.12.5 2012-11-03 PERLQNX(1)