So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if \n]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if \n]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if \n]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if \n]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.=
But I'm wondering how you discovered it a week later. Are you somehow regularly checking complete recent feed histories?
This project is verrrry alpha. all the configuration is literally in the code.
This project is verrrry alpha. all the configuration is literally in the code.
bar being a variable?
bar being a variable?
bar being a variable?
bar being a variable?
-eq is for numerical comparation only. Weird error message, though. Tells something about the implementation.
h
bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
h
bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
eq is for numericals.
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if \n]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.=
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.=
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.=
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.=
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.=
on_grid_living. 😛
i was suppose to go for another 30 minutes. my energy level is off and i may need to reassess some goals.
#running #treadmill
i was suppose to go for another 30 minutes. my energy level is off and i may need to reassess some goals.
#running #treadmill
i was suppose to go for another 30 minutes. my energy level is off and i may need to reassess some goals.
#running #treadmill
https://www.science.org/content/blog-post/things-i-won-t-work-dimethylcadmium
https://www.science.org/content/blog-post/things-i-won-t-work-dimethylcadmium
Fan = Miefquirl. 😏~=
Fan = Miefquirl. 😏~=
Fan = Miefquirl. 😏~=
Fan = Miefquirl. 😏~=
https://github.com/timelinize/timelinize
https://github.com/timelinize/timelinize
libapache2-mod-php* if you want to make use of PHP.Typically, systemd will automatically start your webserver during system startup. Your package manager (
apt) does not prompt you, because the package maintainer has chosen some defaults for you which works with the rest of the system. So there is simply no need. Why would you want to change the installation directory anyways?Also, right after installation, I'd assume that Apache2 is automatically started. If you want to start Apache2 by hand, you can
sudo systemctl start apache2, there are also the stop and restart verbs.The tutorial linked by @prologic seems a bit outdated to me (old Ubuntu version and SysVInit), you might be better off with: https://ubuntu.com/server/docs/how-to-install-apache2 Even though, that's probably also not so beginner-friendly.