3 ms·
I enjoy some cool macos tricks, but the bash substitution was something I had never seen! Very neat, I looked into it briefly and it looks like using {@%.*} is
by kelsey98765431 2y ago
I enjoy some cool macos tricks, but the bash substitution was something I had never seen!
Very neat, I looked into it briefly and it looks like using {@%.*} is not posix compliant, but a bashism. However the substitution itself is posix compliant, so I may start using something like this in my scripts. Need to look at this more, but this is a heck of a lot less clunky than `echo | sed`... I need to go read `info coreutils` more closely.....
- msephton 2y ago${@%.*} is valid in both bash (old macOS default shell) and zsh (current macOS default shell).