Sponsored Content
Top Forums Shell Programming and Scripting Replace nulls with a value in a file Post 302852131 by rudoraj on Tuesday 10th of September 2013 03:07:08 PM
Old 09-10-2013
Can we also do it at vi editor as we do global replacement? but using my scenario
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

GREPing for Nulls

I just had a filesystem / file corruption issue on my HSP's server due to disk capacity limits and fileswapping. I discovered that certain files got corrupted when fileswapping was not successful and they ended up with a string of control characters, or what I believe to be nulls, in them. Does... (4 Replies)
Discussion started by: Dr. DOT
4 Replies

2. Programming

Blanks vs: Nulls

I'm relatively new to Pro*C programming. In the following example: char name; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL; "John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a... (1 Reply)
Discussion started by: ebock
1 Replies

3. Shell Programming and Scripting

Replacing nulls using sed

Hi, I am trying to replace nulls with spaces in every record of a '|' delimited file. I used this command - cat input.dat | sed 's/||/| |/g' > output But if a space appears twice '| | |' , then only the first null is getting replaced with a space. The second one remains as a null. I... (7 Replies)
Discussion started by: novice1324
7 Replies

4. Shell Programming and Scripting

How to check Null values in a file column by column if columns are Not NULLs

Hi All, I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies

5. Shell Programming and Scripting

sort truncates line when they contain nulls

When I try to sort a file where some records contain nulls i.e. hex 00 the sort truncates the record when it reaches the null and writes message: "sort: warning: missing NEWLINE added at end of input file myfile" I'm assuming from this that the sort sees the null as a special character and... (6 Replies)
Discussion started by: ArthurWaik
6 Replies

6. Shell Programming and Scripting

replace nulls with whitespaces in a file

Hi, i have a file which contains data in fixed length. each row contains data of 10 characters fixed length. The data in the file appears like 4567782882 some times i may recieve dat less than fixed length of 10. in such a case i find nulls appended at the trailing spaces when i do a... (2 Replies)
Discussion started by: meeragiri
2 Replies

7. Red Hat

Counting columns in a delimited record with NULLs

I am trying to count the number of columns in a delimited flat file. The record is tab delimited. When I use the command wc -w, I am getting unexpected results when the record contains a NULL value. I believe it is because there is a "word" missing. The below example will return 4 words... (2 Replies)
Discussion started by: nmalencia
2 Replies

8. Shell Programming and Scripting

Script that Nulls Contents of Files

Ok, I'm stuck here with a plan to get what I need done completed. I want to use perl to produce a document. lets say the document will be a pdf document. Now, is there a way for me to put a tiny little code in that pdf document that can make the pdf file null itself if run on a non-unix... (2 Replies)
Discussion started by: SkySmart
2 Replies

9. UNIX for Beginners Questions & Answers

Remove or truncate trailing nulls from file

I want to remove from a file the trailing null characters (0x00) and stop doing so when a different byte is found (which should not be deleted), and either put the result to the same file or a different one. Any ideas? (9 Replies)
Discussion started by: Tribe
9 Replies
KEYMOD(1p)						User Contributed Perl Documentation						KEYMOD(1p)

NAME
keymod - Modifies key parameters in a DNSSEC-Tools keyrec file SYNOPSIS
keymod [options] keyrec1 ... keyrecN DESCRIPTION
keymod modifies the key parameters in a keyrec file that are used to generate cryptographics keys used to sign zones. The new parameters will be used by zonesigner when generating new keys. It has no effect on existing keys. zonesigner will use the new parameter for a zone the next time it generates a key that requires that parameter. This means that, for example, a new ZSK length will not be used during the next invocation of zonesigner if that invocation will be performing KSK-rollover actions. The following fields may be modified: kskcount - count of KSK keys ksklength - length of KSK keys ksklife - lifetime of KSK keys random - random number generator device file revperiod - revocation period for KSK keys zskcount - count of ZSK keys zsklength - length of ZSK keys zsklife - lifetime of ZSK keys New key/value fields will be added to a zone keyrec file to inform zonesigner that new values should be used. The key portion of the added fields will begin with "new_". For example, a new KSK length of 2048 will be written to the keyrec file as: new_ksklength 2048 All zone records in the specified keyrec file will be modified, unless the -zone option is given. In that case, only the named zone will be modified. If a zone keyrec already contains a new key/value field, then the value will be modified on subsequent runs of keymod. OPTIONS
keymod recognizes the following options. Multiple options may be combined in a single keymod execution. All numeric values must be positive or zero. If a new key/value field should be deleted from a zone keyrec, then a zero or empty string value should be specified for the appropriate option. -zone zonename The zone keyrec whose name matches zonename is selected as the only keyrec that will be modified. If this name is not given, then all zone keyrec records will be modified. -ksklength ksklength The ksklength field will be modified in the selected keyrec records to the given value. This is a numeric field whose values depend on the cryptographic algorithm to be used to generate keys for the zone. -kskcount kskcount The kskcount field will be modified in the selected keyrec records to the given value. This is a numeric field. -ksklife ksklife The ksklife field will be modified in the selected keyrec records to the given value. This is a numeric field. -random random The random field will be modified in the selected keyrec records to the given value. This is a text field that will be passed to the key generator. -revperiod revperiod The revperiod field will be modified in the selected keyrec records to the given value. This is a numeric field. -zskcount zskcount The zskcount field will be modified in the selected keyrec records to the given value. This is a numeric field. -zsklength zsklength The zsklength field will be modified in the selected keyrec records to the given value. This is a numeric field whose values depend on the cryptographic algorithm to be used to generate keys for the zone. -zsklife zsklife The zsklife field will be modified in the selected keyrec records to the given value. This is a numeric field. -nocheck If this option is given, the krfcheck command will not be run on the modified keyrec file. -verbose Display information about every modification made to the keyrec file. -Version Displays the version information for keymod and the DNSSEC-Tools package. -help Display a usage message. COPYRIGHT
Copyright 2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. AUTHOR
Wayne Morrison, tewok@tislabs.com SEE ALSO
zonesigner(8), krfcheck(8) Net::DNS::SEC::Tools::keyrec.pm(3) file-keyrec(5) perl v5.14.2 2012-06-21 KEYMOD(1p)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy