Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
menherahair (menherahair@eientei.org)'s status on Friday, 11-Apr-2025 06:42:08 JST menherahair
bash parameter expansion pattern removal syntax mnemonics for beginners
as seen on your keyboard:
# - start
$ - here's the money
% - end
${x#ass} expands to $x with "ass" removed from the beginning of $x
${x%ass} expands to $x with "ass" removed from the end of $x
${x##*/} is like retarded $(basename $x)
${x%\.*} may get rid of file extension