[Lxr-dev] [ lxr-Bugs-3535240 ] Typo error when check swish-e
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2012-06-25 13:00:51
|
Bugs item #3535240, was opened at 2012-06-14 09:30 Message generated for change (Comment added) made by jbglaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3535240&group_id=27350 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: genxref Group: current cvs Status: Open Resolution: None Priority: 5 Private: No Submitted By: squall.ho (squallho) Assigned to: Nobody/Anonymous (nobody) Summary: Typo error when check swish-e Initial Comment: at line 240, the wrong typo of $toolloc = `which swhish-e 2>/dev/null`; an extra "h" will make the $toolloc always be empty, since there is no binary named sw"h"ish-e. should be correct as $toolloc = `which swish-e 2>/dev/null`; ---------------------------------------------------------------------- Comment By: Jan-Benedict Glaw (jbglaw) Date: 2012-06-25 06:00 Message: `command -v ....' should basically do what `which' did: jbglaw@pluto:~$ command -v vim /usr/bin/vim Does it behave differently on your system? So I'd just use $toolloc = `command -v swish-e 2>/dev/null`; ---------------------------------------------------------------------- Comment By: Andre-Littoz (ajlittoz) Date: 2012-06-24 02:58 Message: Thanks for pointing out the typo. To jbglaw: Why do you recommend not to use 'which'? I want to get the path to the executable, while 'command -v' will only print identification and version information. But portability-wise, I may be wrong. Instead of comparing path with value of parameter 'xxx-bin', I should blindly use parameter 'xxx-bin' with -v option and see if it returns the correct name for the tool. What is your opinion? ---------------------------------------------------------------------- Comment By: Jan-Benedict Glaw (jbglaw) Date: 2012-06-15 07:08 Message: Please don't use `which' any longer. To my knowledge, `command -v ...' is a portable replacement. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3535240&group_id=27350 |