The most useful Shell command
Often I need to know the path to a program, e.g. to sh
for writing a shell script or to svn
or git
, for this there is a simple shell command called which
.
Usage:
which sh
Outputs:
/bin/sh
Which I can then use in a shell script with a shebang (#!), like so:
#!/bin/sh
Simples ;)
Written by Jasdeep Khalsa
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#