Consider this tiny script: If I call it like this ./script.sh ~/docs, I get /home/me/docs as output. However, I need it to echo ~/docs. How can I a ...
Consider this tiny script: If I call it like this ./script.sh ~/docs, I get /home/me/docs as output. However, I need it to echo ~/docs. How can I a ...
I am trying to create a simple bash script that takes paths to directories as input and plugs them into an scp command. The scp command looks like thi ...
I have environment variable export MY_WORK_DIR="~/project". While I'm using below command, it give me an error: realpath $MY_WORK_DIR realpath: '~/p ...
When using a tilde (~) in scss import paths, it expands to node_modules/ in Angular. Is there any piece of official documentation that says that this ...
I'm sure this has been asked before but I can't find anything. We have inscrutable login names on a shared machine and want to use shell variables to ...
if i define the path as '/home/rihiraj12/outputcsvre.csv', it works fine. ...
Bash is not expanding the ~ character in the argument --home_dir=~. For example: Bash does expand ~ when I leave out the hyphens: Why does Bash ...
I'm currently making a shell in C++ and I've been able to output the absolute directory as the prompt with getcwd(), however when the user reaches the ...
I want to make a function to expand names of the form ~user with that user's home directory (usually /home/user/), including ~root, which is typically ...
My module.modulemap file looks like this: module CompanyInternalSDK { header "~/Company/CompanyInternalSDK.framework/Headers/CompanyInternalSDK.h ...
On my OSX machine, I can't use ~ as the backup character for in-place sed. Any other character is fine. The error I get is... cryptic: rename(): Not a ...
I recently learned that ~ refers to the HOME variable. So, if I set HOME=/foo and then try to use a bash script that would like to cd ~/Documents it e ...
I'm trying to copy a file from: ~/.ssh/ but everytime I run the script it keeps saying copybash.sh Any Suggestions? Thank you ...
I have a Dockerfile with the following line: The user user1 already exists and has a home directory (i.e. /home/user1). The goal, of course, is to ...
I need to be able to remove a directory that is relative to the Documents folder of any user's system. If I manually enter the expanded path (/User ...
I'm able to awk this file directly from the command line but when I try to use it from my script it breaks. Not sure why. Heres my script ...
How can I expand a path String with a tilde in Swift? I have a string like "~/Desktop" and I'd like to use this path with the NSFileManager methods, w ...
I am looking for a simple student-proof way to specify a custom TMPDIR in R sessions. R seems unable to expand ~ or $USER, so if I simply write TMPDI ...
The following tilde expansion works as expected. In the following case, tilde expansion does not work because the tildes are within quotes. I kn ...
The tilde expression is not working on my RStudio! I am using a windows 10 OS. Update : After looking more carefully(thanks to Dason) It seems the " ...