Hi All,
I have to insert 2 values to a text file in specific places. I have been able to extract each variable value via a script but am not able to send these variable values to the text file.
Pasted is the script for extracting the variable values:
for i in `ls -1`
do
s=`awk 'END{print NR}' $i`
dur=`awk '{s+=substr($0,85,9)}END{printf "%09d\n", s } ' $i`
length=`printf "%036d %s" $s`
echo -en $length"\t\t$dur""\n"
done
After getting the values, I need to insert them into the text file pasted below mantaining the space length between the strings:
$length $dur 130219235419 00000000 00000000000000 00000000000000000000000000 000000000 0000000000 000000000000000 00000000000000000000000000000000000000000000000000 0
Any idea how we can do it. Any help is appreciated a lot