Script for moving processed podcasts back to player:
#!/bin/bash
for f in result/*; do
base=`basename "$f"`
if [ -L "original/$base" ]; then
orig=`readlink -f "original/$base"`
echo "Moving $base"
mv "$f" "$orig"
rm "original/$base"
else
echo -e "\E[33mSkipping $base, no original file or not a symlink\E[0m"
fi
done
UPD: Added checking for existance of original file and it's a symlink. Added progress display.
Published: Jul 8, 2013, 10:10:31 AM - Modified: Jul 25, 2013, 2:05:55 PM
Tags:
bash, linux Comments -
Permalink