04-14-2016
many thanks - it's been a while since I have done unix stuff - it's all coming back to me 0
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a script that scan files, find old templet and replace it with new one.
#!/bin/ksh
file_name=$1
old_templet=$2
new_templet=$3
# Loop through every file like this
for file in file_name
do
cat $file | sed "s/old_templet/new_templet/g" > $file.new
#do a global searce and... (8 Replies)
Discussion started by: amir_yosha
8 Replies
2. Shell Programming and Scripting
Hi....can you guys help me out in this script??
Below is a portion text file and it contains these:
GEF001 000093625 MKL002510 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL003604 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL005675 000001... (1 Reply)
Discussion started by: pallavishetty
1 Replies
3. Shell Programming and Scripting
Hi
I am new to Unix shell scripting. But i need help to slove the below issue.
Issue description:
I want to read table, view names and package names in a file
my plan to find the table name is : search "From" key word find the table or view
To find the packge name : Search "Package... (5 Replies)
Discussion started by: sboss
5 Replies
4. Shell Programming and Scripting
Hi ,
I Have following requirement:
DB2 Sql query to pass from a parameter file
for example, I would create a parameter file with (SELECT column 1, column 2 FROM Table name) then job would read it and create a file with the contents named table.txt
How to write/modify below ksh script to... (10 Replies)
Discussion started by: developer.dwh9
10 Replies
5. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
6. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
7. Shell Programming and Scripting
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies
8. UNIX for Beginners Questions & Answers
HELLO
I need your help please , i need to read a file that contain a table like :
Name | Status
------------------
DB 1 | UP
DB 2 | UP
DB 3 | DOWN
DB 4 | UP
DB 5 | UP
the objective to read each line and check if DB is UP or Down and give me the name of Down database.... (10 Replies)
Discussion started by: Abdellah
10 Replies
9. UNIX for Beginners Questions & Answers
We have 100 linux servers, All send logs to both centralize server(server1 and serverb).
all send logs every day and stores in /syslog folder with hostname.log file.
I need to prepare script to check every day from both centralize server(server1 and serverb) and send mail in table format.
... (1 Reply)
Discussion started by: yash_message
1 Replies
genxlt(1) General Commands Manual genxlt(1)
NAME
genxlt - Generates a codeset conversion table
SYNOPSIS
genxlt [-f outputfile] [inputfile]
OPTIONS
Specifies that the generated version of the codeset conversion table be placed in the file specified by outputfile.
DESCRIPTION
The iconv subsystem can use either an algorithmic or a table converter to convert data from one codeset to another. The genxlt command cre-
ates a table converter to be used by the iconv subsystem.
The genxlt command reads a source codeset conversion table file from inputfile and writes the compiled version to outputfile. If inputfile
is not specified, standard input is used. If outputfile is not specified, standard output is used. The source codeset conversion table file
contains directives that are acted upon by the genxlt command to produce the compiled version.
The format of a translation source file is as follows: Lines whose initial nonwhite-space character is the # (number sign) are treated as
comment lines. Null lines and lines consisting only of white-space characters are treated as comment lines. Noncomment lines have to be
of the following form: source target comment
If source is found in the source codeset conversion table file multiple times, the last entry is used in the compilation of the translation
table.
The source and target arguments must be in the range of 0x00 through 0xff, inclusive; this restricts the table to 8-bit codesets. The con-
version table must define all of the 256 possible source values; otherwise, processing the table results in an error.
The following is an excerpt of a codeset conversion table:
0x80 0xc7 C cedilla 0x81 0xfc u diaeresis 0x82 0xe9 e acute 0x83 0xe2 a circumflex 0x84 0xe4 a diaeresis 0x85
0x40 a grave
The name of the file generated by the genxlt command must use the following naming convention in order for the iconv subsystem to recognize
the file as a valid converter.
fromcode: "ISO8859-1-GL" tocode: "ISO8859-1" conversion table file: "ISO8859-1-GL_ISO8859-1"
The conversion table file name is formed by concatenating the tocode file name onto the fromcode file name, with an underscore character
between the two. The compiled conversion table must reside in the /usr/lib/nls/loc/iconvTable directory or, if the LOCPATH variable is
defined, in an iconvTable directory subordinate to the LOCPATH directory. Otherwise, the iconv command does not find the table.
Note
The LOCPATH variable also overrides the default search path (/usr/lib/nls/loc) that is used to find locales. If this variable is defined,
it must therefore specify a search path that application and system software can use to find both locales and converters. The LOCPATH vari-
able is not defined by any standard, so use of the variable should be limited to testing locales or converters under development.
EXIT STATUS
If successful, the genxlt command exits with a value of 0 (zero). If an unknown flag is detected, or the specified input file or output
file cannot be opened, the genxlt command is unsuccessful and exits with a value of 1. If a syntax error is detected in the input stream,
the genxlt command will exit immediately with a value of 2, and write to standard error the line numbers where the syntax error occurred.
SEE ALSO
Commands: iconv(1)
Functions: iconv(3)
genxlt(1)