Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Invalid Characters in the file. Post 302163161 by kanu_pathak on Thursday 31st of January 2008 06:07:10 AM
Old 01-31-2008
Thanks for the reply Perderabo. There are some more doubts;

=>There can be lots more invalid character like these, so shall I give all them in the 'like' command?

=>If I want to replace the 'invalid character' with a 'space' how can I do that?

=>How to run whole process for thousands of records in the file?

Attached is an example in this regard...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Invalid Characters in the file.

I am working on AIX. We ftp files to a database. The flat files are having thousands of records and each record is having some 50 to 60 characters(there are fields having certain character length). In addition to some valid ascii characters some invalid characters like Å, å, Ä, ä or pipes creep in which... (5 Replies)
Discussion started by: kanu_pathak
5 Replies

2. Programming

string with invalid characters

This is a pretty straight-forward question. Within a program of mine, I have a string that's going to be used as a filename, but it might have some invalid characters in it that wouldn't be valid in a filename. If there are any invalid characters, I want to get rid of them and essentially squeeze... (4 Replies)
Discussion started by: cleopard
4 Replies

3. Shell Programming and Scripting

writing shell script to find line of invalid characters

Hi, I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Discussion started by: beginner82
3 Replies

4. UNIX for Dummies Questions & Answers

to delete an invalid file

there is a file is generated from my program due to undefined filename. -rw-r--r-- 1 angie angie 8644055 Jun 22 09:17 Ô$ÿÿÿÿÿÆ may i know how to delete this file..??? thanks in advance... :) (5 Replies)
Discussion started by: chxxangie
5 Replies

5. Shell Programming and Scripting

Capturing the invalid records to error file

HI, I have a source file which has the below data. Tableid,table.txt sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table.txt sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6... (6 Replies)
Discussion started by: shruthidwh
6 Replies

6. Shell Programming and Scripting

Remove invalid database characters on a file

Hi All - I'm building a script wherein it is design to remove characters that are not accepted on a non-unicode database. Examples are the following: ï,¿,½,Â,é, etc. I can easily sed those characters one-by-one but I there's a problem when other unicode characters are found. Is there any way to... (1 Reply)
Discussion started by: Jin_
1 Replies

7. Shell Programming and Scripting

Valid and invalid date in the file

Hi All, How to validate the 4th column,it is date column in the file, if it valid move to valid file else moved invalid file. 9f680174-cb87|20077337254|0|20120511|N 9f680174-cb88|20077337254|0|20120534|N i want two file valid.txt and invalid.txt Thanks, (7 Replies)
Discussion started by: bmk
7 Replies

8. UNIX for Dummies Questions & Answers

To get the invalid characters from a file

Hello, Can any one help me in below query to search all the invalid characters that UNIX cannot recognize from a file. can we do anything with the help of grep command or any other commands. Also, i am not sure what are the invalid characters present in the file. Many thanks in advance. ... (6 Replies)
Discussion started by: schandru
6 Replies

9. Shell Programming and Scripting

How to get the Invalid records from a file using awk?

My Input file is fixed length record ends with . as end of the line and the character length is 4156 Example: 12234XYZ TY^4253$+00000-00000........... I need to check is there any control characters(like ^M,^Z) The line will be splitted awk '{id=substr($0,1,5) nm=substr($0,6,3)... (2 Replies)
Discussion started by: dineshaila
2 Replies

10. UNIX for Beginners Questions & Answers

Search for the invalid url in a file

Hello guys, Here i am writing a script to check for a valid url from a file,i am getting the valid url & i print it in a file and i want to print the invalid url also.how to do that? #here is my script if then URL=$(grep -E -o... (2 Replies)
Discussion started by: Meeran Rizvi
2 Replies
db_load(8)						      System Manager's Manual							db_load(8)

NAME
db_load - Loads standard input to a database files (Enhanced Security) SYNOPSIS
/usr/tcb/bin/db_load [-nT] [-c name=value] [-f file] [-h home] [-t btree|hash|recno] db_file FLAGS
Specify configuration options for the DB_INFO structure provided to db_open ignoring any value they may have been based on the input. The command-line format is name=value. The following keywords are supported: The minimum number of keys per page. The byte order for integers in the stored database metadata. The size of pages used for nodes in the tree, in bytes. The value of the DB_DUP flag. The density within the hash table. The size of the hash table. Specify fixed-length records of the specified length. Specify the fixed-length record pad character. The value of the DB_RECNUM flag. The value of the DB_RENUMBER flag. The parenthetical listing specifies how the value part of the name=value pair is interpreted. Items listed as (boolean) expect value to be 1 (set) or 0 (unset). Items listed as (number) convert value to a number. Items listed as (string) use the characters of value directly. Read from the specified input file, instead of from the standard input. Specify a home directory for the database. The correct directory for enhanced security is /var/tcb/files. Do not overwrite existing keys in the database when loading into an already existing database. If a key/data pair cannot be loaded into the database for this reason, a warning message is displayed on the standard error output and the key/data pair are skipped. The -T option allows non-Berkeley DB applications to easily load text files into databases. If the database to be created is of type btree or hash, the input must be paired lines of text, where the first line of the pair is the key item, and the second line of the pair is its corresponding data item. If the database to be created is of type recno, the input must be lines of text, where each line is a new data item for the database. A simple escape mechanism, where newline and backslash () characters are special, is applied to the text input. Newline characters are interpreted as record separators. Backslash characters in the text will be interpreted in one of two ways: If the backslash character pre- cedes another backslash character, the pair will be interpreted as a literal backslash. If the backslash character precedes any other character, the two characters following the backslash will be interpreted as hexadecimal specification of a single character, that is, a is a newline character in the ASCII character set. For this reason, any backslash or newline characters that naturally occur in the text input must be escaped to avoid misinterpretation by db_load. If the -T option is specified, the underlying access method type must be specified using the -t option. Specifies the underlying access method. If no -t option is specified, the database will be loaded into a database of the same type as was dumped, that is, a hash database is created if a hash database was dumped. The btree and hash databases may be converted from one to the other. The recno databases may not be converted to any other database type or from any other database type. DESCRIPTION
A customized version of the Berkeley Database (Berkeley DB) is embedded in the operating system to provide high-performance database sup- port for critical security files. The DB includes full transactional support and database recovery, using write-ahead logging and check- pointing to record changes. The db_load utility reads from the standard input and loads it into the db_file database . The database db_file is created if it does not already exist. The input to db_load must be in the output format specified by the db_dump utility or as specified for the -T option. The db_load utility utility attaches to one or more of the Berkeley DB shared memory regions. In order to avoid region corruption, it should always be given the chance to detach and exit gracefully. To cause db_load to clean up after itself and exit, send it an interrupt signal (SIGINT). The db_load utility can be used to load text files into the security databases. It is used by Tru64 UNIX utilities and is not recommended for use by system administration. The edauth utility provides a supported means of loading records correctly into the security databases. RETURN VALUES
The db_load utility exits 0 on success, and >0 if one or more key/data pairs were not loaded into the database because the key already existed, and with >1 if an error occurs. ENVIRONMENT VARIABLES
If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home. The home directory for security is /var/tcb/files. FILES
/var/tcb/files/auth.db /var/tcb/files/dblogs/* RELATED INFORMATION
Files: authcap(4) Commands: edauth(8), db_dump(8) delim off db_load(8)
All times are GMT -4. The time now is 12:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy