Help in viewing the junk character

Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 10-28-2014
Help in viewing the junk character

Hello All,

I have issues in unix file when I loaded that to database and do
Code:
select * from table where description  like '%'+char(13)+'%'

on it I am able to get records. I tried to view the file in unix it is all having blank character which I think is all non ascii which I am not able view. Can you please help me a way to identify the junk character

1. I used cat -v, I still see empty spaces
2 I used od -c, I still see empty spaces
3 I used vim -b , I still see empty spaces
4 I used sed as
Code:
sed -n 'l' prj48n.cls

below is my output
Code:
0438After Shave                   $

Thanks
Arun
Moderator's Comments:
Mod Comment Please use CODE tags for input and output samples as well as for code samples.

Last edited by Don Cragun; 10-28-2014 at 03:16 PM.. Reason: Add CODE tags.
# 2  
Old 10-28-2014
Well, you could try opening the file using vi
and then:

:set list

Quick vi tip: Show Hidden Characters

Also, not sure what database you're loading to, however, if it is Oracle, you could use DUMP to show the characters:

Code:
select DUMP(col_name) from table where description like ....

# 3  
Old 10-28-2014
Hello ,

I tried to do a
Code:
set list

in vi and
Code:
list

in vim both showing that as blank character. When I load the same file to my sybase database it is showing junk character as char(13). I mean when I do select on char(13) it is showing records

Thanks,
Arun
# 4  
Old 10-28-2014
Why don't you post the output of od -c or even od -tx1c of that file?
# 5  
Old 10-28-2014
Hello,

Please find the output below

(p009Smilie3:/pl/data>)
Code:
od -c p48n.cls

Code:
0000000   0   4   3   8   A   f   t   e   r       S   h   a   v   e
0000020
0000040          \n
0000043

(p009Smilie3:/pl/data>)
Code:
od -tx1c p48n.cls

Code:
0000000 30 34 33 38 41 66 74 65 72 20 53 68 61 76 65 20
          0   4   3   8   A   f   t   e   r       S   h   a   v   e
0000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

0000040 20 20 0a
                 \n
0000043

Thanks,
Arun
Moderator's Comments:
Mod Comment CODE tags are needed for sample input and output as well as for code samples.

Last edited by Don Cragun; 11-05-2014 at 01:25 PM.. Reason: Add CODE tags.
# 6  
Old 10-28-2014
Please use code tags around data/output as well!

OK, no junk chars, just a lot spaces. That's an all ascii *nix file.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Junk character appearing after downloading the file from windows server Riverstone Shell Programming and Scripting 19 09-09-2014 02:56 PM
How to see junk character in file in.? scriptor Shell Programming and Scripting 11 12-12-2013 10:09 AM
Junk email harika03 Shell Programming and Scripting 1 08-07-2013 08:25 AM
removing of junk character ripudaman.singh Shell Programming and Scripting 5 10-12-2012 10:58 AM
Check Junk character in sql file Digjoy83 Shell Programming and Scripting 1 07-21-2012 07:19 AM
Junk Character appended at the end of a line raghu_shekar Shell Programming and Scripting 4 08-26-2010 06:39 AM
Remove all JUNK character from file. Amit.Sagpariya Shell Programming and Scripting 4 01-30-2009 09:55 AM
Junk Character in file nathgopi214 Shell Programming and Scripting 2 03-27-2008 09:08 AM
How to remove junk (^“) character while FTPing vkumbhakarna UNIX for Dummies Questions & Answers 8 03-25-2008 08:57 AM
More Junk hrachG Shell Programming and Scripting 0 12-16-2007 04:02 AM
Get rid of junk character in a file nskworld UNIX for Advanced & Expert Users 2 08-14-2007 02:39 AM