2 ms·
For your example, in bash you can do infile=input.png outfile="${infile/.png/.jpg}" Yes, supposing it exists and you've permissions for it, you can us
by forgotpwd16 5y ago
For your example, in bash you can do
infile=input.png
outfile="${infile/.png/.jpg}"
Yes, supposing it exists and you've permissions for it, you can use sed. Do that a dozen times and the calls to an external process add up to a significant time. But the real advantage is being easier to write and work with.