I have done following
#!/bin/bash
PROJDIR="//$HOST/projects"
cd $PROJDIR
newscript
exit 0
Purpose of the script is to enter in shared folder and trigger another script
within it, but the script newscript
doesn't work if it do not get full path.
Here $HOST
is machine name,
projects is shared folder on my machine. Its actual path is C:\Users\vikram\HOME\share
.
I have shared it with advanced sharing options where we can share the folder with some different name. (Here it's projects
.)
After entering in the directory and after doing pwd
I get //VIKRAM/projects
.
Here I want its actual absolute path in any way.
I am using Windows 10 as OS and Cygwin as terminal.