delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/12/03:31:02

Message-ID: <3507aaf0.flying-brick@flying-brick.caverock.net.nz>
From: Eric Gillespie <root AT flying-brick DOT caverock DOT co DOT nz>
To: djgpp AT delorie DOT com
Date: Thu, 12 Mar 1998 21:29:18 NZT-12DST
Subject: I'm stumped! hexdump is dumping...
Reply-to: root AT flying-brick DOT caverock DOT net DOT nz

I've been designing a program to display a file in a similar manner to 
Vernon Buerg's (relatively) famous LIST program, and I have the core 
routines of dumping hex and text (the last one was the trickiest, I can 
tell you!).  As I am a complete novice at programming, I have finally 
arrived at a point where reading isn't helping me any more.

I want to do the following - debug a program where the input is from a pipe, 
such as the line below:
cat filedir.c | hexdump -t

... in this case, hexdump is the file I want to debug. Unfortunately when I 
tried specifying the args to the program in gdb, it  thought I meant:
hexdump cat filedir.c | hexdump -t, and pouted at me (telling me quite 
correctly it couldn't open the file -t  - at least I had THAT right 8-))
The program works correctly (or appears to) when I fed it a file on the 
commandline, such as:
brick:$ hexdump -t filedir.c
but I have tried to also design with piping in mind...though DOS'es pipes 
are brain-dead files on disk until finished with...

Can anyone help with this one?

Thanks...the Viking AT caverock DOT net DOT nz

--
     Super User
 /|   ,.:*^*:.,   |\  Cheers from the Viking family ... including Marmalade
| |_/' viking@ `\_| | Running M$DOG in Christchurch!
|   flying-brick    | $FunnyMail 5.38 C.S. Lewis:  If Man has no God,
 \_.caverock.net.nz/  then where did Man's morals come from?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019