curl-users
Curl behavior with and without pipe
Date: Thu, 8 Apr 2010 14:51:30 -0400
Below, you will find a bit of a brain-teaser for me. In the first
"curl" command it gives the expected listing of files on the 127.0.0.1
server (with no other output) - however, the second command line (which
only adds a stdout pipe to an egrep) gives additional output as if I had
turned an option on for it. Any idea why? Also, how would I remove the
extra output (which is nice to have in some cases just not this one)? I
know that I can go in and possibly analyze what is going on with
strace/truss type utilities - but, thought I would try this (possibly)
quicker solution first. Thanks in advance for your help.
~
$ curl -l --ftp-port - ftp://127.0.0.1/
testdir
testdir2
testdir3
testfile
testfile10
testfile11
testfile12
testfile13
testfile14
testfile3
testfile4
testfile5
testfile6
testfile7
testfile8
testfile9
~
$ curl -l --ftp-port - ftp://127.0.0.1/ | egrep testfile1
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
176 176 0 176 0 0 14666 0 --:--:-- --:--:-- --:--:--
0
testfile10
testfile11
testfile12
testfile13
testfile14
Version info follows:
$ curl --version
curl 7.19.6 (i686-pc-cygwin) libcurl/7.19.6 OpenSSL/0.9.8n zlib/1.2.3
libidn/1.16 libssh2/1.2
Protocols: tftp ftp telnet dict http file https ftps scp sftp
Features: IDN IPv6 Largefile NTLM SSL libz
-- Robert
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-08