Post AYnmEh06xUXjfv4RdI by unlambda@hachyderm.io
(DIR) More posts by unlambda@hachyderm.io
(DIR) Post #AYnmEgCpuh7zD615pQ by b0rk_reruns@social.jvns.ca
2023-08-08T18:23:57Z
0 likes, 0 repeats
bash parameter expansionPermalink: https://wizardzines.com/comics/parameter-expansion/
(DIR) Post #AYnmEh06xUXjfv4RdI by unlambda@hachyderm.io
2023-08-16T19:57:25Z
0 likes, 0 repeats
@b0rk_reruns @b0rk Does anyone have any good way of remembering what each of these syntaxes do? Each time I use them, I have to look it up in the docs to make sure I'm using the right thing.How do you remember which of ${var#pattern} or ${var%pattern} removes a prefix or a suffix?I have such a hard time remembering I look it up each time. Anyone have some tricks for remembering?
(DIR) Post #AYnmEi56wO8X1iPx44 by tomjennings@tldr.nettime.org
2023-08-16T22:15:29Z
0 likes, 0 repeats
@unlambda @b0rk_reruns @b0rk I try to remember where in the man page they are.
(DIR) Post #AYnsBxS1wK5dYED0dM by unlambda@hachyderm.io
2023-08-16T23:22:14Z
0 likes, 0 repeats
@tomjennings @b0rk_reruns @b0rk I guess "man bash" followed by "/suffix" will find it for you; I have usually skipped the Bash man page as I seem to recall it just being a stub that pointed to info docs that were too hard to search, but maybe I'm misremembering or maybe they've finally decided to give up the GNU crusade against man pages.