sed Or Grep Problem OR Terminal Problem?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sed Or Grep Problem OR Terminal Problem?
# 15  
Old 02-12-2015
I repeat: the printable contents of the file input.txt is:
Code:
9DCGA8D
A88GDCF8

There are no lines in this file that will not be deleted from the output by the sed command because every line in the input file contains an "8"!
# 16  
Old 02-12-2015
Sparse file?
Post an (truncated!) output of
Code:
od -tcx1 input.txt

.
# 17  
Old 02-12-2015
Code:
9
A8
BG
CF
DE
ED
FC
GB
8A
90
99
A08
AAG
ABF
ACE
ADD
AEC
AFB
AGA
A80

This is line no 1 to 20. Theres still some line without numbers like AFB ad AGA

Code:
AEDGDDB0
AEDGDDB9
AEDGDDC8
AEDGDDDG
AEDGDDEF
AEDGDDFE
AEDGDDGD
AEDGDD8C
AEDGDD9B
AEDGDE0A

This is somewhere in the jungle Smilie [I don't know which line no ] I think something bad must have gone wrong since sed can't read but there are still characters inside :S

Last edited by rbatte1; 02-12-2015 at 07:21 AM.. Reason: Changed ICODE tags to just CODE tags
# 18  
Old 02-12-2015
How did you produce those lines? They are contradictory to what you posted before.
# 19  
Old 02-12-2015
Here's the a preview of truncated Ver

Code:
0000000    9  \r   A   8  \r   B   G  \r   C   F  \r   D   E  \r   E   D
           39  0d  41  38  0d  42  47  0d  43  46  0d  44  45  0d  45  44
0000020   \r   F   C  \r   G   B  \r   8   A  \r   9   0  \r   9   9  \r
           0d  46  43  0d  47  42  0d  38  41  0d  39  30  0d  39  39  0d
0000040    A   0   8  \r   A   A   G  \r   A   B   F  \r   A   C   E  \r
           41  30  38  0d  41  41  47  0d  41  42  46  0d  41  43  45  0d
0000060    A   D   D  \r   A   E   C  \r   A   F   B  \r   A   G   A  \r
           41  44  44  0d  41  45  43  0d  41  46  42  0d  41  47  41  0d
0000100    A   8   0  \r   A   8   9  \r   A   9   8  \r   B   0   G  \r
           41  38  30  0d  41  38  39  0d  41  39  38  0d  42  30  47  0d
0000120    B   A   F  \r   B   B   E  \r   B   C   D  \r   B   D   C  \r
           42  41  46  0d  42  42  45  0d  42  43  44  0d  42  44  43  0d
0000140    B   E   B  \r   B   F   A  \r   B   G   0  \r   B   G   9  \r
           42  45  42  0d  42  46  41  0d  42  47  30  0d  42  47  39  0d
0000160    B   8   8  \r   B   9   G  \r   C   0   F  \r   C   A   E  \r
           42  38  38  0d  42  39  47  0d  43  30  46  0d  43  41  45  0d
0000200    C   B   D  \r   C   C   C  \r   C   D   B  \r   C   E   A  \r
           43  42  44  0d  43  43  43  0d  43  44  42  0d  43  45  41  0d


It's a lot more way down.. I m not sure if I m suppose to post all.

---------- Post updated at 05:26 AM ---------- Previous update was at 05:24 AM ----------

This input.txt was produced from Microsoft Excel. Maybe that's the reason the characters are not recognised. And I really gotta delete those line containing numeric numbers Smilie
# 20  
Old 02-12-2015
All those \r (0X0D) characters ... but shouldn't MAC OS's sed handle them correctly?
# 21  
Old 02-12-2015
Indeed, I pasted the codes from Excel [Mac Version].
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Silly problem with sed and grep

I am trying to delete all empty lines from a file using either grep -v ^$ file or sed '/^$/d' file But neither one is working. I have uploaded the file I am trying to modify. Any help will be greatly apreciated. (3 Replies)
Discussion started by: Xterra
3 Replies

2. HP-UX

Problem with terminal

Hi Guys, I'm using my putty to connect to the HP-UX test box. Once I get connected to server there seem to be something wrong with my putty that behaves very odd. for example it starts from the half of the screen. I really dont know how to explain this problem. or for instance when i run vi to... (2 Replies)
Discussion started by: messi777
2 Replies

3. Linux

Terminal logging character problem -Newbie-

Im a complete newbie tryin to work with linux centos; in terminal wanted to log with script command; but output file has some strange characters when I try to open with gedit or bluefish terminal , gedit, bluefish encoding is utf-8 ; Script started on Mon 08 Mar 2010 03:32:39 PM EET... (2 Replies)
Discussion started by: anacondauser
2 Replies

4. Shell Programming and Scripting

Problem - gnome terminal shell scripting

I've a python script named rwe.py. I'm running the program in three separate terminals. If one of the executing program stops . I want to leave the terminal as it is so that i can see the error. i wrote a the below script and used cron to run it every one hour to check if the three programs are... (0 Replies)
Discussion started by: msteve2002
0 Replies

5. Shell Programming and Scripting

Problem with gnome-terminal

Hello everyone. This is my first post.:o Using Ubuntu 8.04 and bash 3.2.39 i'm trying to adapt my routine to this platform. So, this means forget xterm and use gnome-terminal (as default ubuntu terminal). EveryDay i need to connect to several servers, and i've made a Tcl'script to make this... (1 Reply)
Discussion started by: trutoman
1 Replies

6. Linux

tty terminal permissions problem

I'm hoping someone can help me out here. I'm having a problem on my Red Hat Enterprise 5 Server where my tty devices "tty" are being set to read only permissions. I need them to be set to 777 in order to write to the serial printers through a custome application. I have gone through many... (2 Replies)
Discussion started by: Netwrkengeer
2 Replies

7. Programming

terminal problem

i am executiing some commands using system an popen command in c. while executing the code . some data is shown on terimal without using any print statement. how can i solve this problem thank u sree (1 Reply)
Discussion started by: phani_sree
1 Replies

8. SCO

Terminal Allocation Problem

Hello All, I am facing a problem on SCO Open Server V 5x, We are using serial communication on dumb terminals, right now i am facing a problem on some terminals, as they are not showing thier previous tty no, as tty13 or tty18, but they are showing ttya6 or ttya4, i also tried to move and link... (5 Replies)
Discussion started by: Awadhesh
5 Replies

9. UNIX for Advanced & Expert Users

terminal type problem with cygwin on aix

hey, I use cygwin to connect to AIX 5.2 but when I open vi I get an error saying: ex: 0602-108 cygwin is not a recognized terminal type how can I fix that? I thought cygwin was tty vt100? (1 Reply)
Discussion started by: rein
1 Replies

10. UNIX for Dummies Questions & Answers

terminal problem

Hi all While trying to upon a new window it is saying UNABLE TO GET PTY..what does this means how to solve it Thanks Prafulla (4 Replies)
Discussion started by: Prafulla
4 Replies
Login or Register to Ask a Question