#!/bin/bash
FILE="$(basename "$1")"
FILE="${FILE/%.jpeg/.jpg}"
Is there anyway to glue these two lines together into a one-liner?
bashshellshell-scriptstring
#!/bin/bash
FILE="$(basename "$1")"
FILE="${FILE/%.jpeg/.jpg}"
Is there anyway to glue these two lines together into a one-liner?
Best Answer
FILE=$(basename "${1/%.jpeg/.jpg}")
worked for me.test:
script contents: