Organiser of the Edinburgh Language Exchange and The Edinburgh Open Tech Scene |
Full Snack Developer 🥪, Ramen guzzler 🍜, quiche murderer 🥧. A friendly cat.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Wait what I wrote this forever ago and didn't even notice I was using eval. Now I'm not sure why I was doing that at all. Probably to get round issues with things like printing messages that start with a dash or something
I rarely if ever deal with arrays in shell scripts - but your changes look like the right thing to do! Thanks.
The final output in mine comes down to hostname | toilet -f future | lolcat . Future is such a nice, small font compared to the "tiny" fonts or figlet/toilet's usual enormous banners :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was trying to figure out why you were using eval, then realised, you are not making use of "array" structures. Using those, you can have:
Using the quotes arround the array dereference allows it to split just as you had specified initially. For a more direct example:
Prints
As for your output -- which program eventually produced it? I like it :D
Wait what I wrote this forever ago and didn't even notice I was using eval. Now I'm not sure why I was doing that at all. Probably to get round issues with things like printing messages that start with a dash or something
I rarely if ever deal with arrays in shell scripts - but your changes look like the right thing to do! Thanks.
The final output in mine comes down to
hostname | toilet -f future | lolcat
. Future is such a nice, small font compared to the "tiny" fonts or figlet/toilet's usual enormous banners :)