myownshadow wrote:
Code:
#!/bin/bash
#secureflvrename.sh
#author: myownshadow
for file in `file * | grep "Macromedia Flash Video"| sed "s/:*Macromedia Flash Video//" | sed "s/://"`
do
mv $file `basename $file`.flv
done
this script checks filetype disregarding filename, and renaming the real flv files in current directory, u can change "*" with $1 to give an argument target.
Quote:
so it seems im not fine with sed, can someone pull together two sed sentences?
Thank You.
This script worked excellant.
Now that I have a script that actually works,I will attempt to learn how it works.
Looks like a lot going on with it.