Mail Archives: djgpp/1998/03/12/03:31:02
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 -