3 ms·
How do I type for src in $(find . -type '*.png') do sdir="$(echo "${src}" | dirname)" name="$(echo "${src}" | basename)" dstdir
by pdkl95 11y ago
How do I type
for src in $(find . -type '*.png')
do
sdir="$(echo "${src}" | dirname)"
name="$(echo "${src}" | basename)"
dstdir="/mnt/www/images/${sdir}"
optipng -out "${dstdir}/${name}" "${src}"
convert -scale 120x120\> "${src}" "${dstdir}/small_${name}"
done
into a GUI's "copy paste" feature?
- Sanddancer 11y agoyou long press the f for the terminal window to start hilighting text, and drag it to the e in done, and then choose copy.
- LoSboccacc 11y agoYou don't there are plenty better ways to list and filter files check out how beos did it. You could do literally the same and you didn't even need to drop to the console.