my question seems to be general, but i can\'t find any answers.
In sed command, how can you replace the substitution pattern by a value returned by a simple bash fun
Agree with Glenn Jackman. If you want to use bash function in sed, something like this :
sed -rn 's/^([[:digit:].]+)/`date -d @&`/p' file | while read -r line; do eval echo "$line" done
My file here begins with a unix timestamp (e.g. 1362407133.936).