153 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
87
views
How do I provide the correct file paths to merge-doc.js in Git config using Git bash in Windows?
I'm trying to use the merge-doc.js script in my Git config for merge driver and mergetool for .docx, but the TortoiseGit helper script that starts a compare in Word using DCOM requires absolute paths ...
0
votes
2
answers
85
views
Which one is more accurate, os.environ['PWD'] or os.getcwd()?
def getcwd():
# get current path, try to use PWD env first
try:
a = os.stat(os.environ['PWD'])
b = os.stat(os.getcwd())
if a.st_ino == b.st_ino and a.st_dev == b.st_dev:...
0
votes
1
answer
46
views
Getting the working directory if the script is a soft link
I have two folders. Call them A and B.
A is populated with python code. Among them, function1.py.
B contains data, and a soft link (created using ln -s) to A/function1.py.
When I execute B/function1....
1
vote
1
answer
57
views
Why is it I don't get pwd result from this dart code?
I'd like to get the result of my command line 'pwd' from my Dart console program.
I wait for the process to start, install the listeners and wait for the task to complete.
I don't get the result ...
1
vote
1
answer
290
views
Octave can't find any folders
When I run very simple code, octave returns that the Folder does not exist, but I'm pretty sure it exists.
I can't grasp what I'm doing wrong.
function TestLoading(path)
if isfolder(path)
...
0
votes
2
answers
107
views
Keep bash cwd the same directory as cwd of Powershell that spawned it
I have a Powershell session that creates bash session to run a script like so
C:\msys64\usr\bin\bash -lc './super_duper_script.sh
Where the super_duper_script.sh is in the cwd of Powershell session. ...
0
votes
3
answers
229
views
absolute path if PWD itself is a symlink
I have following folder structure created via mkdir -p foo subdir/bar && ln -s subdir/bar bar
├── bar -> subdir/bar
├── foo
└── subdir
└── bar
when working in bar folder: How can I ...
0
votes
1
answer
230
views
How to get pwd relative path in bash without first slash
I am writing a small Bash script to do some automatic commands. In particular , i would like to get relative path without first '/' in pwd
pwd : Users\hp\OneDrive\Desktop
insted of
pwd : \Users\hp\...
0
votes
2
answers
987
views
How do I display only the current directory name and not the entire path (pwd) shown in fish/tile prompt?
Good morning, please I installed fish (version 3.6.1) with tide (version 5.5.1) on Debian.
I configured tide with the following options selected ...
Prompt Style (3) Rainbow
Prompt Colors ...
0
votes
0
answers
94
views
Wrong PWD when splitting window in tmux while in git diff
When running git diff in a tmux window and I split the window, I expect the newly created pane to use the same working directory. Here are my bindings to split the window:
unbind %
bind | split-window ...
0
votes
1
answer
2k
views
Run bash script in current directory Linux
Why can't I run a bash script in the current directory I'm in?
Whenever I run the script the commands are executed in the home directory.
The only answers I found are included below.
I do use the zsh ...
1
vote
1
answer
568
views
Check is [wildcard] Folder exist and set is as variable
I have this bellow command to check is folder contains name "AAA_*" in path "C:\Test" exist and if so - make from it name variable:
$DirPath = "C:\Test"
$DirName = "...
0
votes
3
answers
152
views
running subprocess with combined cd and pwd
I run subprocess in jupyter to get the core path.
I have to go one folder up and then call pwd
Running:
import subprocess
mypath=subprocess.run("(cd .. && pwd)")
leads to a "No ...
2
votes
1
answer
2k
views
How to get the current path with symlink (not the actual path) in a c program on a linux system?
I am currently building a custom shell that can handle a few internal and external commands along with their options. One of these internal commands is pwd. From the man page of pwd, I got that pwd -L ...
0
votes
1
answer
64
views
Qbs cannot get PWD file on MacOS
I want to use my script as cpp.compilerWrapper: ["../../script"]
I'm using relative path (from my .qbs file) to point the script. It works OK na linux. but on macOS doesn't.
Also when I'm ...