[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using netcat with badblocks output



> Ok so I have netcat up and listening on my main workstation(P667).  I've 
> tested it from my other computer (becks) by echoing some text into netcat and 
> it works, I get a file with the text on P667.  So netcat is working.
> My next problem is figuring out how to get the output of badblocks to redirect 
> through netcat.
> I try piping '|'  I still see output on becks and nothing sent through netcat 
> to P667.
>     badblocks -w -p 4 -b 4096 -c 16384 -s /dev/hda | netcat 1234 192.168.101

try "netcat 1234 192.168.101.1 | badblocks -w -p 4 -b 4096 -c 16384 -s 
/dev/hda 2>&1"

I am wondering if it is putting the info to stderr instead of stdout, some 
programs do that and it is a complete pain in the ass.

> If I try redirecting the output with '>' into netcat, badblocks complains 
> about bad arguments.

yeah, redirection at times will get munged

> Is there a way to redirect the output file into netcat, or is this one of 
> those things that I need to redirect STout and STerr (I think those might be 
> the terms) into netcat?

i think what i said earlier might work.  not really sure though, i'll 
fiddle around here in the lab and see what i can break.

Tighe

-- 
Tighe Schlottog         workape         fiaid
"Nothing is too cruel if it is funny enough."


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.