Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

get cwd in shell script

#!/bin/bash
echo "Script executed from: ${PWD}"

BASEDIR=$(dirname $0)
echo "Script location: ${BASEDIR}"
Comment

PREVIOUS NEXT
Code Example
Shell :: cargo generate 
Shell :: secure shell (ssh) 
Shell :: linux get processor count 
Shell :: linux copy file 
Shell :: docker container commands 
Shell :: install xampp in ubuntu 20.04 
Shell :: git add only one file 
Shell :: create git 
Shell :: delete a remote branch in git 
Shell :: install nodemon in express 
Shell :: sed add a line after a match 
Shell :: audiokit pod 
Shell :: show git branch in terminal fish 
Shell :: How to Install and Configure doctl on Ubuntu 
Shell :: bash add options to script 
Shell :: aws cli last successful deploy 
Shell :: read (subshell_pty...): No such file or directory (2) 
Shell :: tree command in hpc 
Shell :: Command used to show the content stored inside a file in linux 
Shell :: replace master branch entirely with another branch 
Shell :: logitech m525 linux driver ubuntu 
Shell :: bash add element to front of array 
Shell :: delete remote branch git 
Shell :: compile 
Shell :: fix EACCEC 
Shell :: how to find the sha512 windows 10 
Shell :: terminal shortcuts 
Shell :: mnet - git config user 
Shell :: explicitly pull images from docker hub and list them on your terminal 
Shell :: angular breadcrumb from url 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =