Plastech
Plastech

Reputation: 791

Pipe data without EOF? Possible?

I am trying to write a bash script that opens an FTP connection in nc that remains open in the background. I have:

(echo "USER o:)"; echo "PASS foo")| nc -d 192.168.56.101 21 &

but the connection is closing immediately. Is there a better way to do this?

Thanks a ton

Upvotes: 0

Views: 119

Answers (1)

Plastech
Plastech

Reputation: 791

I got it: add a read to the chain!

Upvotes: 1

Related Questions