Search Results

Search: Posts Made By: pulsorock
17,336
Posted By kurumi
Just for f in *$OLD_EXT; do .... ...
Just

for f in *$OLD_EXT; do
....
echo "Old File: " $f
echo "New File: " $NEW_FILE
.....
done
17,336
Posted By Chubler_XL
If no files match $file will be "*.flv" ...
If no files match $file will be "*.flv"

This will be better (also weeds out any directories or special files with a .flv suffix):

for f in *$OLD_EXT; do
[ -f "$file" ] || continue
.......
17,336
Posted By Ygor
Change...$NEW_FILE=$(sed 's/$OLD_EXT/$NEW_EXT/g'...
Change...$NEW_FILE=$(sed 's/$OLD_EXT/$NEW_EXT/g' $f)...to...NEW_FILE=$(echo $f | sed "s/$OLD_EXT/$NEW_EXT/g")

---------- Post updated at 09:56 AM ---------- Previous update was at 09:54 AM...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy