bash get current path code example
Example 1: python get current file location
import os
os.path.dirname(os.path.abspath(__file__))
Example 2: rails get current path
request.url
# => "http://localhost:3000/lists/7/items"
request.path
# => "/lists/7/items"
Example 3: get current directory vbscript
scriptdir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Example 4: get current path unix
#Will generate the current directory
pwd