Sponsored Content
Full Discussion: treating special chars
Top Forums Shell Programming and Scripting treating special chars Post 302120006 by braindrain on Saturday 2nd of June 2007 12:35:13 PM
Old 06-02-2007
Error treating special chars

Hi,

I need some advise on treating non printable chars over ascii value 126

Case 1 :
On some fields in the text , I need to retiain then 'as-is' and load to a database.I understand it also depends on database codepage.
but i just wanna know how do i ensure it do not change while loading on assumption database codepage is set properly.

Case 2;
I wanna omit special chards on some fields for an instance
Code:
cat myfile returns Blatn
and 
cat -vet myfile returns 
BlatnM-

So how do I ensure I load only Blatn after omitting the special character.

I understand, both the cases are contradictory, but it's as good as my requirement Smilie



Thanks
Brian
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Supress special chars in vi

Hi, One of our application is producing log files. But if we open the log file in vi or less or view mode, it shows all the special characters in it. The 'cat' shows correctly but it shows only last page. If I do 'cat' <file_name> | more, then again it shows special characters. ... (1 Reply)
Discussion started by: divakarp
1 Replies

2. Shell Programming and Scripting

special chars arrangement in code

here is my simple script to show process and owners except me: ps `-ef |grep xterm |grep -v aucar` | while read a1 a2 a3 a4 a5 a6 a7 a8 do echo KILL..\($a1\).. $a2 |more done how can I pass values from command "ps -ef |grep xterm|grep -v aucar" to ? because above command... (2 Replies)
Discussion started by: xramm
2 Replies

3. Shell Programming and Scripting

Special chars in sed variable

Hi, For years ive been using this script to do mass search & replaces on our websites. Its worked with all sorts of spaces, quotes, html or whatever with a little adjusting here and there. But I just cant get this pattern to work: #!/bin/bash OLDURL="document.write('<script... (2 Replies)
Discussion started by: mutex
2 Replies

4. UNIX for Dummies Questions & Answers

Strings with Special chars in IF condition

I was trying to run a code to check if a fax number is empty or not. for that, I've written the following code which is throwing an error. #!/bin/ksh fax= "999-999-9999" if ; then fax_no="000-000-0000" else fax_no=$fax fi echo $fax_no And I get the... (7 Replies)
Discussion started by: hooaamai
7 Replies

5. UNIX for Dummies Questions & Answers

Remove Unicode/special chars from XML

Hi, We are receiving an XML file in Unix which has some special characters between tags like '^' etc <Tag> 1e^O7f%<2304e.$d8f57e8^Bf-&e.^Zh7/327e^O7 </Tag> We need to remove all special characters like ^ ones and also any '&' or '<' or '>' being sent within the start and close tags i.e.... (6 Replies)
Discussion started by: dsrookie7
6 Replies

6. Shell Programming and Scripting

print all between patterns with special chars

Hi, I'm having trouble with awk print all characters between 2 patterns. I tried more then one solution found on this forum but with no success. Probably my mistakes are due to the special characters "" and "]"in the search patterns. Well, have a log file like this: logfile.txt ... (3 Replies)
Discussion started by: ginolatino
3 Replies

7. Shell Programming and Scripting

All strings within two special chars

I have a file with multiple lines. From each line I want to get all strings that starts with '+' and ends with '/'. Then I want the strings to be separated by ' + ' Example input: +$A$/NOUN+At/NSUFF_FEM_PL+K/CASE_INDEF_ACC Sample output: $A$ + At + K (20 Replies)
Discussion started by: Viernes
20 Replies

8. Shell Programming and Scripting

If condition matching with special chars

Hi, I have file #cat drivers.txt fcs0 fcs1 vscsi1 vscsi2 In this i need to check the availabality of "fcs" or "vscsi" alone not vscsi0,fcs1 I tried with "if condition" but it is not working. cat drivers.txt| while read ADAP do echo "Checking for $ADAP" if ;then echo "FC... (9 Replies)
Discussion started by: ksgnathan
9 Replies

9. UNIX for Dummies Questions & Answers

How to search for a string with special chars?

Hi guys, I am trying to find the following string in a file, but I always get pattern not found error, not sure what is missing here. Can you help please? I do a less to open the xrates.log and then do a /'="18"' in the file and tried various combinations to search the below string. String... (8 Replies)
Discussion started by: santokal
8 Replies

10. UNIX for Beginners Questions & Answers

Shell script to split data with a delimiter having chars and special chars

Hi Team, I have a file a1.txt with data as follows. dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><! The delimiter string: <SelectStatement modified='1' type='string'><! dlm="<SelectStatement modified='1' type='string'><! The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
gdbload(1)							   HP100LX Tools							gdbload(1)

NAME
gdbload - load ASCII formatted data into an HP 100LX database SYNOPSIS
gdbload [-an] database [ input ] DESCRIPTION
gdbload loads ASCII formatted data into an HP 100LX database. database is the name of the 100LX database to modify. input is the name of a file of ASCII data to load into the database. If no input file is specified, the standard input is used. The ASCII file format is one exported by many database packages as well as by gdbdump(1). Options gdbload recognizes the following options: -a Add the records from the ASCII file to the database, keeping the records already present in the database. By default, the records in the ASCII file replace those already in the database. -n Do not back up the database file. By default, the original, unmodified database file is left in a file with the same name and a .bak extension. Input Format Description The input to this program is an ASCII text file which starts with a line containing field names. This line indicates the order in which fields appear on subsequent lines. Not all fields of the database need be specified; unspecified fields will be left blank in all added records. Field names are not case distinct and ampersands (&) are ignored in comparing field names. This first line is followed by one line for each record of the database. Note that any of these lines may be split into multiple lines if needed, by placing a backslash () at the ends of lines which are continued. Also note that string fields may span multiple lines provided they are quoted. Apart from line splitting according to these rules, each "logical" line contains all of the fields whose names were listed on the first line, in the same order as on the first line. The fields (and the field names, on the first line) are separated by commas. Exactly how each field should appear depends on its type. Text fields, category fields, number fields, and note fields should have their text quoted if it contains commas or newlines. The following escape sequences are understood: Carriage return (ASCII 13). Line feed (ASCII 10). nn nnn are octal digits representing a character. xnn nn are hexadecimal digits representing a character. Any other character following a backslash is treated as a standard character with no special meaning, i.e., backslash and quote marks can be escaped by preceding them with a backslash. Date fields should appear in the format YYYYMMDD; for example, August 15, 1993 should appear as 19930815. Time fields appear in the format HHMM, where HH is in the range 00-23. Date and time fields may also be left blank, i.e., nothing between the commas. Radio buttons and check boxes are turned off if the field is empty or contains a 0; they are turned on otherwise. No other field types, including application-defined types, are accepted by gdbload. The output from gdbdump(1) matches this input format, unless the -n flag is given to gdbdump(1). WARNINGS
When the newly constructed database is first opened by the 100LX, it will (erroneously) be reported as being empty. This is because gdbload does not construct database indexes, and the 100LX expects the index for the current "subset" to be valid. The situation is remedied by pressing F6 and selecting any "subset" (even the current one!) This will rebuild the index for that "subset", causing records to display normally. The delay caused by the rebuild depends on the size of the database (among other things), and ranges from imperceptible for small databases up to several minutes. This delay will occur whenever a new "subset" is selected for the first time. gdbload will not attempt to modify HP 100LX Appointment Book and World Time databases. gdbload will not allow you to specify data for application-defined fields of a database. This program cannot handle password-protected databases. Attempts to load data into password-protected databases will have unpredictable results. AUTHOR
gdbload was written by Steven Roth, stever@cup.hp.com, and is being maintained by Arne Christensen, arc@pine.dk. Contact the latter for bug reports, enhancement requests, or to get a copy of the source code. DISCLAIMER
This program is released into the public domain and neither the author nor the maintainer place any restrictions on its use. We make no warranties or guarantees for this program and you use it at your own risk. This program is supplied by us personally and not by Hewlett- Packard Co. or Pine Tree Systems, which incur no obligations pertaining to it. ACKNOWLEDGEMENTS
Many thanks to Andy Gryc for publishing the details of the database file formats! SEE ALSO
gdbdump(1). Steve Roth et.al. February 1996 gdbload(1)
All times are GMT -4. The time now is 02:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy