Hello
I'm trying to write the last line in a file like this (colors are just for help in here):
8518082006154522000100000000
Code:
tempfile=tempf.txt
artikel=$(grep -c ^50 $tempfile)
echo 85$(date +%d%m%Y%H%M%S)$artikel000000>>$tempfile
$artikel has a value but doesn't add it to the line. What's wrong?
$artikel should also always be a 6-digit number. How can I do that?
The 000000 at the end doesn't appear...
Thanks for your help!