News for hackers. Stuff that matters.
Re:Bash 5.0 released by flukus on Tuesday January 08, 2019 @01:41AM (#18853774)
It's not as nice, "cat $today" is easier to type than "cat $(today)" and would give better completion, just declared matching variables instead of matching functions, files and executables.

On the plus side, TIL the subshell syntax plays well with eval/expand shortcut (ctrl+alt+e).

Re:Bash 5.0 released by hawski on Tuesday January 08, 2019 @04:01AM (#18854264)
Wouldn't "cat $today" result with "cat: No such file or directory: 2019-01-08"? Did you mean echo instead of cat?
Re:Bash 5.0 released by flukus on Tuesday January 08, 2019 @05:40PM (#18860480)
My real life use case for these dynamic variables would be more like "cat/vim/cp $log" to get today's log file which would expand to something like /somedir/logs/201901/09/product.log. Handy when you have a large matrix of products/environments.
Re:Bash 5.0 released by forty on Tuesday January 08, 2019 @09:41AM (#18855751)
Only in the case when no such file exists in the current directory :)
Re:Bash 5.0 released by edoloughlin on Tuesday January 08, 2019 @08:46AM (#18855434)
* "cat $today" is easier to type than "cat $(today)"*

Except you should really be in the habit of typing "cat ${today}" ;)

Re:Bash 5.0 released by yjftsjthsd-h on Tuesday January 08, 2019 @09:16AM (#18855610)
Except you should really be in the habit of typing `cat "${today}"` ;) Quote everything!
Re:Bash 5.0 released by LukeShu on Tuesday January 08, 2019 @11:01AM (#18856469)
Why? The {} doesn't prevent glob expansion or field separation.
Re:Bash 5.0 released by Vogtinator on Tuesday January 08, 2019 @02:55AM (#18854030)
It's not obvious that just expanding a variable runs code though.