Sponsored Content
Top Forums UNIX for Advanced & Expert Users Insertion of Null Character while writing into file Post 302582153 by issaq84mohd on Thursday 15th of December 2011 03:59:29 AM
Old 12-15-2011
Insertion of Null Character while writing into file

I have a huge file with record length around 5000 characters.
There is an ETL tool datastage which is writing this data to the file(AIX server). At position 4095 i have seen NULL Character(^@).

when i am using this command "head -1 file_nm | sed 's/\000//g'" --- the output is displaying prperly its removing NULL character but if i write this to another file its adding again.

head -1 file_nm | sed 's/\000//g' ----- Displaying Output without NULL
head -1 file_nm | sed 's/\000//g' > File_nm1 --- can see the NULL charcter in File_nm1.

I think by default AIX is inserting this NULL character for a file whose record length is huge... Is this true??

Please help me out
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

GREP a string with NULL Character

Does anyone know how to use grep/egrep to find a string that contains a null character? i.e.: the string looks like this: null0001nullN well I want to be able to : grep '0001N' is there a wildcard character or something that I can put in the grep to include the nulls? (3 Replies)
Discussion started by: weerich
3 Replies

2. UNIX for Advanced & Expert Users

sending a null character to a terminal

I'm testing out some ESMTP AUTH stuff, and it requires that the username and password be on the same line separated by a null character. Does anyone know how to echo the ASCII null character? Thanks, Alex (3 Replies)
Discussion started by: vertigo23
3 Replies

3. UNIX for Dummies Questions & Answers

Find files which contain a null character

Hi, I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement. Could anyone help please? Thanks! Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies

4. Shell Programming and Scripting

Remove & insertion of data in a same file

I am iterating record by record through a file as below, A,B A,C A,D B,E B,F E,G E,H The same file should look like in the final output as below, A,B B,E E,G E,H B,F A,C A,D (10 Replies)
Discussion started by: videsh77
10 Replies

5. Shell Programming and Scripting

Null Character Handling

Hi All, I have a problem with Null values while reading line by line from a text file. I wrote a shell script to read set of file names from a text file line by line, and zipping the each individual file and copying those zip files into some separate directory, and removing the original file... (3 Replies)
Discussion started by: npk2210
3 Replies

6. Programming

Question about NULL Character & fgets()

Assume client send the message " Hello ", i get output such as Sent mesg: hello Bytes Sent to Client: 6 bytes_received = recv(clientSockD, data, MAX_DATA, 0); if(bytes_received) { send(clientSockD, data, bytes_received, 0); data = '\0';... (2 Replies)
Discussion started by: f.ben.isaac
2 Replies

7. Shell Programming and Scripting

Insertion in a file

Hi All, I want to insert a line just befor the lst line in a file. please can anyone advise. Cheers, Shazin (3 Replies)
Discussion started by: Shazin
3 Replies

8. Shell Programming and Scripting

Operations on a file with Deletion , Modification and Insertion of lines

Hi All , Given a file , I need to delete , modify and insert lines matching certain patterns in that file using shell scripting. e.g. If a file FILE1 has following content : CUST.ABC.DEF = CUST.ABC.DEF * CUST.ABC.DEF PRINTF(CUST.ABC.DEF) CUST.ABC.DEF = mid(CUST.ABC.DEF,10.34)... (5 Replies)
Discussion started by: swapnil.nawale
5 Replies

9. Shell Programming and Scripting

Text file insertion via sed

I have 800+ html files that need to have a javascript added to them in the head. I can do the looping, setting filenames as variables, etc. but I cannot figure out how to insert my javascript file into the html. My javascript is in a file named jsinsert.txt It basically has this format:... (4 Replies)
Discussion started by: Trapper
4 Replies

10. Shell Programming and Scripting

Remove first NULL Character in Flat File

We have a flat file with below data : ^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file I want to remove only the first few null characters before string 00000305 How can we do that, any idea. I want a new file without first few... (5 Replies)
Discussion started by: simpltyansh
5 Replies
gnome-character-map(1)						   User Commands					    gnome-character-map(1)

NAME
gnome-character-map, gucharmap, charmap - insert special characters into a document SYNOPSIS
gnome-character-map | gucharmap | charmap [--font=string] [gnome-std-options] DESCRIPTION
The Character Map application enables you to select characters from a character table, then combine the characters into a text string with standard characters. You can insert the text string that you create into other applications, such as text editor documents. Character Map provides accented characters, mathematical symbols, special symbols, and punctuation marks. Many of the characters are not available on a standard keyboard. Note: The gucharmap application also provides a library called libgucharmap. This library is licensed under GPL. Please see the license file at /usr/share/doc/SUNWgnome-character-map/COPYING.bz2 for implications when writing a program which uses this library. OPTIONS
The following options are supported: --font=string Specify the font name and point size that you want to use to display the characters in the character table, when you start Character Map. gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information. EXAMPLES
Example 1: Launching Character Map example% gnome-character-map Example 2: Launching Character Map With Specified Font Name and Point Size example% gnome-character-map --font="bitstream vera sans italic 20" EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gucharmap Executable for Character Map. /usr/bin/charmap Symbolic link to gucharmap. /usr/bin/gnome-character-map Symbolic link to gucharmap. /usr/share/doc/SUNWgnome-character-map/COPYING.bz2 Location of license file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-character-map | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
bzip2(1), attributes(5), gnome-std-options(5) Character Map Manual Latest version of the GNOME Desktop User Guide for your platform. http://www.fsf.org/licensing/ NOTES
Written by Glynn Foster, updated by Halton Huo, Sun Microsystems Inc., 2003, 2007, 2008. SunOS 5.11 16 Sep 2008 gnome-character-map(1)
All times are GMT -4. The time now is 09:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy