943,782 Members | Top Members by Rank

Ad:
May 15th, 2009
0

how do i display the path name to the bash shell

Expand Post »
how do i display the path name to the bash shell?

Thanks all
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
towelee is offline Offline
2 posts
since May 2009
May 15th, 2009
0

Re: how do i display the path name to the bash shell

You mean put the current working directory into the prompt "like DOS" ?

Or just type
pwd
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
May 18th, 2009
0

Re: how do i display the path name to the bash shell

Or do you mean the full path to the bash binary?

Shell Scripting Syntax (Toggle Plain Text)
  1. $ which bash
  2. /bin/bash
Reputation Points: 46
Solved Threads: 28
Junior Poster
Gromit is offline Offline
183 posts
since Sep 2008
May 19th, 2009
0

Re: how do i display the path name to the bash shell

only thing to remember - if there are space chars in the path, either escape them using '\' or put the path in quotes.

using `find` instead of `ls -A`, is another helpful hint, when iterating through dirs and files with spaces
Moderator
Featured Poster
Reputation Points: 183
Solved Threads: 89
Posting Virtuoso
DimaYasny is offline Offline
1,772 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: how do I use grep/wc/uniq for max line length, word count
Next Thread in Shell Scripting Forum Timeline: need shell script to read particular records from a file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC