08-07-2014
Added the qoute to sample that I had provided.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am using the following command at the Unix prompt to make my 'infile' into a fixed width file of 100 characters.
awk '{printf "%-100s\n",$0}' infile > outfile
However, there are some records with a special character "©"
These records are using 3 characters in place of one and my record... (2 Replies)
Discussion started by: alok.benjwal
2 Replies
2. Shell Programming and Scripting
Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies
3. Shell Programming and Scripting
I have some huge files that are produced daily from a production system written in basic (really). The files are fixed width records, 512 bytes, with newline field separators, newlines if the field is null, and trailing newlines for null fields. The data in the fields can be any ascii... (0 Replies)
Discussion started by: vtischuk@yahoo.
0 Replies
4. Shell Programming and Scripting
Hi All,
I have created a script which generates FIXED-WIDTH file by executing Oracle query.
SELECT RPAD(NVL(col1,CHR(9)),20)||NVL(col2,CHR(9))||NVL(col3,CHR(9) FROM XYZ
It generates the data file with proper alignment. But if same file i transfer to windows server or Mainframe... (5 Replies)
Discussion started by: Amit.Sagpariya
5 Replies
5. Shell Programming and Scripting
I have a file with different record length. The file as to be converted into fixed length by appending spaces at the end of record. The length should be calculated based on the record with maximum length in the file.
If the length is less than the max length, the spaces should be appended... (4 Replies)
Discussion started by: Amrutha24
4 Replies
6. UNIX for Dummies Questions & Answers
I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers.
awk '{print length;exit}' <File_name>
The above code gives me length 50.
wc -L <File_name>
The above code gives me length 53.
Please clarify on... (2 Replies)
Discussion started by: Amrutha24
2 Replies
7. Shell Programming and Scripting
I have a fixed with file with header & trailer length having the same length of the detail record file.
The details record length of this file is 24, for Header and Trailer the records will be padded with spaces to match the record length of the file
Currently I am adding 3 spaces in header... (14 Replies)
Discussion started by: ginrkf
14 Replies
8. Shell Programming and Scripting
Thank u so much .Its working fine as expected.
---------- Post updated at 03:41 PM ---------- Previous update was at 01:46 PM ----------
I need one more help.
I have another file(fixed length) that will get negative value (ex:-00000000003000) in postion (98 - 112) then i have to... (6 Replies)
Discussion started by: vinus
6 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi Forum.
I tried searching for a solution using the internet search but I haven't been able to find any solution for what I'm trying to accomplish.
I have a fixed width column file where I need to search for any occurrences of "D0" in col pos.#1-2, 10-11, 20-21 and replaced it with "XD".
... (2 Replies)
Discussion started by: pchang
2 Replies
LEARN ABOUT DEBIAN
d-shlibmove
d-shlibmove(1) d-shlibs manual d-shlibmove(1)
NAME
d-shlibmove - Move shared library files around in Debian package creation process
SYNOPSIS
d-shlibmove [options] shared-library.so
DESCRIPTION
Call this program in debian/rules as a replacement of dh_movefiles for shared library packages.
It also checks debian/control for validity.
OPTIONS
--movedev [filename] [relative dir-path]
Install file into relative directory path within the -dev package. The dir will be created with install -d and the file will be
moved.
--moveshl [filename] [relative dir-path]
Install file into relative directory path within the shared library runtime package. The dir will be created with install -d and
the file will be moved.
--movedevdoc [filename]
Install file into the documentation directory of -dev package. The dir will be created with install -d and the file will be moved.
Added in version 0.4
--extralib [shared-library.so]
Install the shared library in the same package as the main shared library.
--multiarch
By default d-shlibmove installs the shared library and any extralibs into /usr/lib. Add this flag to install them into
/usr/lib/<architecture-tripplet> instead.
Added in version 0.48
--commit
By default d-shlibmove runs in a dry-run mode. Add this flag to make the moving actually happen.
--suffix [suffix to add to shared library package]
Add a suffix to shared library package. This is a workaround when binary interface to package changed, and some fixup to Debian
packaging needs to be done.
Added in version 0.3
--devsuffix [suffix to add to development package]
Add a suffix to development package. For making incompatible development package.
--shlibs-local [current-version]
Create a debian/shlibs.local file to use, and specify current-version of shared library package. You need to remove
debian/shlibs.local, because this only appends to, not overwrite.
Added in version 0.3
--devunversioned
Install into unversioned development package.
Added in version 0.42
--ignorelibdep
Suppress shlib dependency. Useful when dynamically resolved e.g. using CDBS.
Added in version 0.42
--c102
Add c102 suffix to package names, for C++ ABI transition.
Added in version 0.8
--ldbl
Add dbl suffix to package names.
Added in version 0.35
--include-a
Install the *.a files. This is the default behavior.
Added in version 0.51
--exclude-a
Avoid installing *.a files.
Added in version 0.51
--include-la
Install the *.la files. This is the default behavior.
Added in version 0.45
--exclude-la
Avoid installing *.la files.
Added in version 0.45
--override [override statement]
Add an overriding sed expression, which looks like --override s/libshared1-dev/libshared-dev/. This expression is executed after
the other rules.
Multiple --override can be specified.
Added in version 0.30
EXIT CODE
Return 1 on error.
Return 2 on dry-run.
Return 0 on success.
EXAMPLES
The following is a sample command-line of a hypothetical package installation.
d-shlibmove --commit --movedev "debian/tmp/usr/include/*" usr/include --extralib debian/tmp/usr/lib/libhomeman-pthread.so
debian/tmp/usr/lib/libhomeman.so
AUTHOR
Junichi Uekawa <dancer@debian.org> <dancer@netfort.gr.jp>
SEE ALSO
d-devlibdeps (1)
Debian GNU/Linux 2002 May 3 d-shlibmove(1)