Assume you have a file named "file.txt", containing only one of your "dirty" line. First, you have to determine the octal code of the junk character, which is the 15th of the line:
Now that you have the octal representation of the character you want to remove, try:
Hi All,
I have been trying to FTP some data files from Windows directory to a UNIX server. The txt file in the windows contails the following data:
"111~XYZ~1~Contact person’s phone number~COMMENTS~~~~"
but the same line is appearing as
"111~XYZ~1~Contact person^Òs phone number~COMMENTS~~~~"... (8 Replies)
Hi
set filename "./GopiRun.sh"
if } err] {
writeLog "error in exec "
writeLog $a
} else {
writeLog $a
}
The above code will execute a file GopiRun.sh,and will log the output of the exec to a file.
The problem is the file has lot of junk character in it,how to avoid it.
The... (2 Replies)
A sed command works most of the time however it fails sometimes.
I put each line (record) I read of a file through the following command
data=$(cat file | sed 's///g' | sed 's|.*ex:Msg\(.*\)ex:Msg.*|\1|' )
When I run the script I get a message that states that there is an invalid format... (6 Replies)
Hi Team,
I have a file having size greater than 1 GB. What i want to do is to check if it contains any JUNK character (ie any special charater thats not on the key board stroke). This file has 532 column & seperated with ^~^.
I have found some solution from the file, but it is for a... (4 Replies)
I have a file that I ran the dos2unix utility on, it cleans up pretty well, but I noticed an occasional ^M leftover, (actual characters) these may or may not be strays from my original dos file. Either way, I want to get rid of the ^ and any character that may follow. ^M ^C or whatever.
How do I... (6 Replies)
Hello,
I have two .sql files which I transferred from Windows to Unix (Linux Enterprise Linux Server release 5.3).I want to ensure that these two files have no junk characters in them.How do I do it in the simplest possible way?
Many thanks
DJ (1 Reply)
Dear ALL,
How to remove junk charecter ^M from unix file i am using sun solaris unix.
I already tried few commands
:%s/^M//g
:%s/r//g
but it didnt helped me.
Any help appriciated.
Thanks
Ripudaman
Please view this code tag video for how to use code tags when posting code... (5 Replies)
Hi
I want to know how to see junk character in a file.
i am not able to see junk character using vi or cat command.
below is the junk char . which i see in host file
10.178.14.67▒▒▒ ac01sp02-vip
actually it should be like this
10.178.14.67 ac01sp02-vip
i am using secure CRT... (11 Replies)
Hello,
Im downloading the file from windows server through FTP, the downloaded file is containing some junk character at very start of the file as below and causing my whole script is to fail,
how to download without junk or how to remove these before processing it?
▒▒"nmdbfnmdsfsdf"
... (19 Replies)
Hello All,
I have issues in unix file when I loaded that to database and do 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.... (11 Replies)
Discussion started by: arunkumar_mca
11 Replies
LEARN ABOUT OSX
isgraph
ISGRAPH(3) BSD Library Functions Manual ISGRAPH(3)NAME
isgraph -- printing character test (space character exclusive)
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
isgraph(int c);
DESCRIPTION
The isgraph() function tests for any printing character except space (' ') and other locale-specific space-like characters. The value of the
argument must be representable as an unsigned char or the value of EOF.
In the ASCII character set, this includes the following characters (preceded by their numeric values, in octal):
041 ``!'' 042 ``"'' 043 ``#'' 044 ``$'' 045 ``%''
046 ``&'' 047 ``''' 050 ``('' 051 ``)'' 052 ``*''
053 ``+'' 054 ``,'' 055 ``-'' 056 ``.'' 057 ``/''
060 ``0'' 061 ``1'' 062 ``2'' 063 ``3'' 064 ``4''
065 ``5'' 066 ``6'' 067 ``7'' 070 ``8'' 071 ``9''
072 ``:'' 073 ``;'' 074 ``<'' 075 ``='' 076 ``>''
077 ``?'' 100 ``@'' 101 ``A'' 102 ``B'' 103 ``C''
104 ``D'' 105 ``E'' 106 ``F'' 107 ``G'' 110 ``H''
111 ``I'' 112 ``J'' 113 ``K'' 114 ``L'' 115 ``M''
116 ``N'' 117 ``O'' 120 ``P'' 121 ``Q'' 122 ``R''
123 ``S'' 124 ``T'' 125 ``U'' 126 ``V'' 127 ``W''
130 ``X'' 131 ``Y'' 132 ``Z'' 133 ``['' 134 ``''
135 ``]'' 136 ``^'' 137 ``_'' 140 ```'' 141 ``a''
142 ``b'' 143 ``c'' 144 ``d'' 145 ``e'' 146 ``f''
147 ``g'' 150 ``h'' 151 ``i'' 152 ``j'' 153 ``k''
154 ``l'' 155 ``m'' 156 ``n'' 157 ``o'' 160 ``p''
161 ``q'' 162 ``r'' 163 ``s'' 164 ``t'' 165 ``u''
166 ``v'' 167 ``w'' 170 ``x'' 171 ``y'' 172 ``z''
173 ``{'' 174 ``|'' 175 ``}'' 176 ``~''
RETURN VALUES
The isgraph() function returns zero if the character tests false and returns non-zero if the character tests true.
COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered
obsolete and may not be supported in future releases. The iswgraph() function should be used instead.
SEE ALSO ctype(3), isalnum_l(3), iswgraph(3), ascii(7)STANDARDS
The isgraph() function conforms to ISO/IEC 9899:1990 (``ISO C90'').
BSD July 17, 2005 BSD