Re: Exit status not reflecting 404 with --fail

Timothe Litt via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On 27-Nov-23 15:02, Paul Gilmartin via curl-users wrote:
> On 11/27/23 10:09:03, Petr Pisar via curl-users wrote:
>
>>>
>>> Because of dueling package managers, I have a script that parses
>>> PATH and reports (ls -l) each instance it finds.
>>>
>> Bash builtin "type -a" does that.
> .
> Thanks.  Trying it, I see it reports both aliases and paths,
> presumably in search order.
>
> I don't see a man page that exactly describes that.
>
I didn't mean to start an alternatives discussion.

But in defense of which, you don't need more than this 1 line to handle 
all of the above:

ls -l $(which -a curl | grep -v =)

-a checks aliases and paths.  The grep excludes any alias definitions 
from the ls (their expansions follow and are listed)

If you're not feeding the output into ls (or something else), which -a 
suffices to tell a human what's going on.

Enjoy.

Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
OpenPGP_signature.asc (application/pgp-signature, 495 B)
-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEE0UvvF0GpbrNhifE5DTaRiR4XoSQFAmVk+4AFAwAAAAAACgkQDTaRiR4XoSSM
cggAzSEU5bYCMLWdeysru2zSNDPH8m95OPY4kyeqFCBWBGKnoWpNsLt86H5v/F/3nBWyt41YHxBi
OzhiuP6hsi446/9cngNX8/+r9KpYA242ZmOtBgGwWxrZWhj4yf1roWawEz8kImg6axrGY3km2cD3
OBlwwC5toe23tb78L1C0rXeHKlyJpxZ9SzBDwIbpi/R/5GIheReEjD862KBFnRMry/tFFR1PlFS+
vQ1bUs42zLq2IeYmsAH5mHBfE/+dZua+K6QSbUGQ/vgDz7CpEfSfOUUOX6b4IP3YCkkiBCbo9nTB
+GFkyY/v+4C1KrfvZDPN0buXtFXjqgh9GOdFTgZUiA==
=5OLR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.