spiritech
May 4th, 2013, 06:57 PM
how do i call a function into a while read script. i have a function that renames a file extension.
function rename {
"${f%.*}.$ext"
}
how can i call that function into a while read command
while read f; do echo "rename function"; done
i am aware i could just put it like
while read f; do echo "${f%.*}.$ext" ; done
the actuall function is more complex. so i would like to be able to call it in during the while read command.
spiritech
function rename {
"${f%.*}.$ext"
}
how can i call that function into a while read command
while read f; do echo "rename function"; done
i am aware i could just put it like
while read f; do echo "${f%.*}.$ext" ; done
the actuall function is more complex. so i would like to be able to call it in during the while read command.
spiritech