to avoid a problem you need to know what is causing it.
If the problem is on the first line, then use "head" as a filter to only 
show the first 20 lines of the output.

Just type:

    od -a test.txt | head

I am not sure what your linux/unix background knowledge is but in this line:

   1. od -a test.txt
      prints the ascii content of the file file test.txt with all
      special characters visible
   2. | (the pipe symbol)
      pipes, or redirects, the output of the previous command to the
      next one
   3. head
      prints the first 20 lines of the given input

I think that on this list it is often given that everyone knows (a bit 
of) linux - which is not always true.

Rob

a...@conceptmachinery.com wrote:
> Hi
> i be more interesting in how to avoid problem than see what causing it.
> suppose something there and i have 80 000 line of code and than i need
> look at each line and there 80 000 of them.
> i think need some kind filter.
> unfortunately CAM program windows type and it just creates every time new
> error.
> finding problem in each particular case do not solve problem.
> problem is in CAM program that output wrong stuff.
> i think i need filter that covert correctly and strict what do and dont,
> aram
>
>
>   
>> Again, it looks like you are getting non standard characters in your
>> programs.  Use 'od' to check the contents.  The program file can only
>> consist of regular character (a-z, 0-9, and some punctuation characters).
>>
>> Also, make sure the editor you are using isn't generating a UNICODE text
>> file.  Unicode uses 2 data bytes to represent a single character. If you
>> run
>> 'od' on a UNICODE file you will get this...
>>
>>
>> fra...@workshoppc:~/src$ od -a test.txt
>> 0000000 del   ~   T nul   h nul   i nul   s nul  sp nul   i nul   s nul
>> 0000020  sp nul   a nul  sp nul   t nul   e nul   s nul   t nul
>> 0000036
>>
>>
>> If you post the file (or part of it) as an attachment, we can tell you
>> exactly what is wrong.  If you copy and paste the contents of the file
>> into
>> your email program, these special characters get removed, and we can't see
>> the problem.
>>
>> Frank
>>
>>
>>     
>>> -----Original Message-----
>>> From: a...@conceptmachinery.com [mailto:a...@conceptmachinery.com]
>>> Sent: Tuesday, 30 June 2009 2:05 PM
>>> To: Enhanced Machine Controller (EMC)
>>> Subject: [Emc-users] Bad character'\37777777757' used
>>>
>>> hi
>>> every time i load new program i am getting new error.
>>> now i have that one
>>> near line 2 of/..................
>>>  Bad character'\37777777757' used
>>>
>>> here is first lines
>>>
>>> %
>>>
>>> N2G90
>>>
>>> G55X0Y0Z0
>>>
>>> N4 G0 Z0.25001
>>>
>>> N5 X17.41802 Y37.36987
>>>
>>> N6 G1 Z-0.12328 F7.3
>>>
>>> N7 Z-0.14828 F2.7
>>>
>>> N8 X17.24044 Y36.61335 F3.7
>>>
>>> N9 X17.09375 Y35.1536
>>>
>>> N10 X17.08518 Y36.73141
>>>
>>> thanks
>>> aram
>>>
>>>       

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to