Tagged Questions
0
votes
1answer
67 views
Command substitution in alias resolved in bash profile? [duplicate]
I want to make an alias for randomly changing my mac address
alias chrandmac="sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')"
but the command substitution part is ...
3
votes
3answers
154 views
Bash port auto upgrading script in cron doesn't work properly?
I've been recently try to write a script to automate checks for new version of ports and software installed on my FreeBSD server. This script is added to root's crontab and fires daily. If I run it ...
2
votes
1answer
586 views
Can I run Bash scripts in FreeBSD without modifying them?
Correct me if I'm wrong:
"sh" script != "bash" script
Linux script are written in Bash
Bash script usually #!/bin/sh
In GNU/Linux, /bin/sh is Bash
In FreeBSD, /bin/sh is not bash, it's the true sh
...
2
votes
1answer
474 views
How to Install BASH in FreeBSD
I really find that using bash helps a lot, when you need to retrieve strings of text that you used previously.
But how can I install it on FreeBSD?
I have tried typing bash into the terminal, but ...
1
vote
4answers
331 views
FreeBSD is not Unix. But its Unix-Like Unix. Where is then the main Unix to read the source code?
I want to really understand System V, the main origin of Unix (not Unix-like nor modified Unix to Linux). The main origin which is very confusing and not really with care its written somewhere.
Is it ...
3
votes
3answers
151 views
Doing actions on a list from the shell
I have a list of packages I want to deinstall. The deinstaller program pkg_deinstall doesn't take a list of packages as parameter to deinstall. How would I deinstall from the list (like a foreach ...
4
votes
1answer
524 views
Bash: `-su: $*: unbound variable` with `set -u`
This is a FreeBSD 7.x system running GNU bash version 4.0.
In Bash, the set -u option can force a shell to print an error if it encounters an unset variable, like this:
$ set -u
$ echo $THISISUNSET
...