Welcome To Snipplr


Everyone's Recent Bash Snippets Tagged path



« Prev 1 Next »
  1. FAV

    GIT Bash: projects choice list

    - edit `ppath` in code header to your git projects *path*, put this code into <b>__.bashrc__</b> file and copy it into your *$HOME* dir (in Win Vista / 7 it is often *c:\Users\$YOU*) - you may want set this file as executable inside *GIT bash* <b>...
    Bash saved by 4 people 4 views posted 5 years ago by s1w
  2. FAV

    Ensure string ends with a /

    Bash 2 views posted 5 years ago by jlmarks
  3. FAV

    Relative to Absolute Path Conversion

    the os x version of realpath works differently than the linux version; the following allows you to attain the same functionality in a shell on os x as `readlink -f $0` on a standard linux dist.
    Bash 1 views posted 9 years ago by iloveitaly
  4. FAV

    Find Your Ruby Gems Path

    Because different systems put it in different places.
    Bash 1 views posted 9 years ago by alvarezrilla
  5. FAV

    Creating links in different directories (Linux/UNIX)

    When using `ln` to create a link in a different directory, the semantics of creating hard and symbolic links differ. That is because a hard link contains a direct reference to its target's data, while a symbolic link is just a string containing a (p...
    Bash saved by 5 people 1 views posted 10 years ago by deepsoul
  6. FAV

    Canonical absolute path

    The following shell function returns the canonicalised abolute path of a file. It resolves symbolic links, /./ and /../ as applicable. This was adapted from various sources. Related snippets on snipplr are [Find absolute path of Bash script](http:...
    Bash 1 views posted 10 years ago by deepsoul
  7. FAV

    Find absolute path of Bash script

    Gets the absolute path of the script itself even when it's executing, not just a simple "pwd".
    Bash saved by 2 people 1 views posted 10 years ago by loungerdork
  8. FAV

    Set Linux environment variables JAVA_HOME & PATH globally using /etc/profile

    Bash saved by 3 people 1 views posted 10 years ago by cbrant
  9. FAV

    Determine if a path is in an nfs mount

    This is useful if you have some optional functionality being done which is quite slow on nfs. For example, I have a script that adds scm (svn/git/etc) info to my prompt, but I wouldn't want that when I'm in a repository on an nfs mount.
    Bash 0 views posted 11 years ago by kergoth
  10. FAV

    Add paths to Ruby 'require'

    Suppose you created a script chart.rb in /home/foo/ruby/mylib direcory. Now, you want to use this in the app.rb located in /home/foo/ruby/scripts. In ~/.bash_profile:
    Bash 0 views posted 11 years ago by cczona
« Prev 1 Next »