Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

version not showing

$ zgrep --version
grep through gzip files
usage: zgrep [grep_options] pattern [files]


when i typed above command i do not see any version number? please advise
SOLUTION
Avatar of Scott Silva
Scott Silva
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of noci
noci

both solutions are equal, wrt. to the question. alas the asker didn't followup.
neither are solutions
and additionally the thread has no value in the database
you should have deleted the thread rather than bypass the normal closing process
i'd have objected given a chance
@moderato: that  extends to the asker coming forward with either follow up or  closing it.
BTW it was the EE plaform urging to "Help close this question" .... i will refrain from helping closing the Q in the future.
Maybe the EE platform should not send that message except to the Asker.
i vote for deletion.

@noci: no hard feelings : i merely reacted because i was not given the chance to object. i'm strongly against the closures by "experts", strongly against the possibility to accept one's own answer and get rewarded, and i believe it really is gone sideways if other participants cannot object. i'm well aware that your contributions are usually valuable and don't see you as points-driven. sorry i had no other way to express disapproval but did not meant to single you out. regards
Avatar of gudii9

ASKER

sorry for checking late

$ ls -l $( which zgrep )
what is meaning of above command
i got like below


-rwxr-xr-x 1 rt rt 5551 Sep 30  2016 /usr/bin/zgrep
Avatar of gudii9

ASKER

it worked on lower environment

$ zgrep --version
zgrep (gzip) 1.3.12
which zgrep shows where a program is found in the path... (and will show if it is an official one or hemobrew in /usr/local/bin ....
ls -l  will show executable info etc.   so that was expected.
$(  xxx )   executes xxx in a subshell and deivers the output as an expandable string.
after:
WHERE=$( which zgrep )
WHERE  holds the  name & location of the zgrep program.