Can sed send results to function?
by frrobert from LinuxQuestions.org on (#5GHZJ)
I don't know if I can do this in sed or not.
sed -i "s/\(^[0-9]\{10,\}$\)/myfunction @\1/e" $tmpfile
What I want sed to do go through line by line
1. see if the line is just a 10 digit number
2. if it is pass the number to my function
3. the function does it thing and give a different value
4. sed replace the number with the value from the function.
I get a myfunction not found error when I run the script.
I am not sure if I am even in the right ballpark.
Thanks.


sed -i "s/\(^[0-9]\{10,\}$\)/myfunction @\1/e" $tmpfile
What I want sed to do go through line by line
1. see if the line is just a 10 digit number
2. if it is pass the number to my function
3. the function does it thing and give a different value
4. sed replace the number with the value from the function.
I get a myfunction not found error when I run the script.
I am not sure if I am even in the right ballpark.
Thanks.