02-12-2008
Blanks vs: Nulls
I'm relatively new to Pro*C programming. In the following example:
char name[21]; 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 trim function to do that. If I forget to trim and insert the data into an Oracle table, it creates problems.
Is there a better technique?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Hello,
I am checking the length of each line of a fixed length file and making sure all lines are 161 length. My problem is that some files contain null characters which gets stripped out of my echo. How do I have the NULLs included in my check? (and I cannot replace or sub the NULL values with... (10 Replies)
Discussion started by: ironmix
10 Replies
5. Shell Programming and Scripting
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
6. Red Hat
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
Hi,
I've a PIPE delimited file with about 5 fields. Sometimes the records in the 4th field is null, so I want to replace it based on values we get it on 2nd field in the same file.
Following is an example.
ABCD|X-TYPE 3.0|2010|X-TYPE|20000
CDEF|C-TYPE 2.5|2011|C-TYPE|10000
XYZ|LX... (4 Replies)
Discussion started by: rudoraj
4 Replies
9. UNIX for Beginners Questions & Answers
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
LEARN ABOUT DEBIAN
gnupod_search
GNUPOD_SEARCH(1) User Commands GNUPOD_SEARCH(1)
NAME
gnupod_search - search and remove files
SYNOPSIS
gnupod_search [OPTION]...
DESCRIPTION
Search and Remove files
--help display this help and exit
--version
output version information and exit
-m, --mount=DIRECTORY
iPod mountpoint. Default is $IPOD_MOUNTPOINT
-t, --title=STRING
search songs by Title
-a, --artist=STRING
search songs by Artist
-l, --album=STRING
search songs by Album
-i, --id=INT
search songs by ID
-g, --genre=STRING
search songs by Genre
-c, --playcount=COUNT
search songs by Playcount
-s, --rating=STARS
search songs by Rating (1 star = 20, 2 stars = 40 ...)
-R, --podcastrss=RSS
search songs by podcast-rss
-U, --podcastguid=GUID
search songs by podcast-guid
-b, --bitrate=BITRATE
search songs by Bitrate
-o, --match-once
Search does not need to match multiple times (like ($a || $b || $c))
--delete
Remove (!) matched songs from the iPod
--view=ialt
Modify output, default is 'ialt'
t = title a = artist r = rating p = path
l = album g = genre c = playcount i = id
--rename="KEY=VALUE"
Rename KEY into VALUE for matched songs.
Example: Rename the Artist 'Jon Doe' into 'John Doe'
gnupod_search --artist="Jon Doe" --rename="artist=John Doe"
AUTHOR
Written by Adrian Ulrich
REPORTING BUGS
Report bugs to <bug-gnupod@nongnu.org>
COPYRIGHT
Copyright (C) Adrian Ulrich
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for gnupod is maintained as a Texinfo manual. If the info program and GNUpod are properly installed at your site,
the command
info gnupod
should give you access to the complete manual.
gnupod_search 1.00 June 2005 GNUPOD_SEARCH(1)