Questions tagged [tilde]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
1answer
1k views

Expansion of tilde in zsh

I stumbled upon this behavior of zsh when using FreeBSD: % dd if=/dev/zero bs=1M count=1 of=~/test2 dd: failed to open '~/test2': No such file or directory This really confused me because the same ...
2
votes
4answers
813 views

Bash script copy file to user's (wildcard) home dir

I need to copy /root/nbu/file1.sh to every user's home directory if user's id is even number. Trying to execute following script: #!/bin/bash cat /etc/passwd | while read LINE do username=$(awk -...
0
votes
3answers
538 views

using tilde in variable from the user

I saw a lot of posts about it all over the internet but i couldn't make it run as i wanted. I have an input from the user of a path. If the user will type ~/Desktop/ for example i can't use $ans in ...