Parameter Expansion?
I'm trying to do what I believe is called parameter expansion
eg: old_name=run_fix.bash new_name=${old_name%.bash}.in_hold.txt
in bash
i'm trying to automaticly convert files to thier current name but replacing eg .png with .avif i heard the best way to do this is to use parameter expansion i have this shell script "name file2.ion"
#!/bin/ion
let old_name=@args[1]
#$HOME/go/bin/avif -e @args[1] -o $(echo @args[1] |sed 's/.png&/.avif/')
let new_name=${old_name%.*}.avif
$HOME/go/bin/avif -e @args[1] -o $new_name
and would execute ./file2.ion ./picture.png and get ion: syntax error: syntax error: '%' at position 25 is out of place and i don't understand why