0

I have the following variable

lanint="β— lan.1021 (inactive -> active - 1 Change)"

and I want to append it to the begin of a file I use the following code, but it shows me an error because I use spaces and special characters.

awk -i inplace 'BEGINFILE{print strftime("%d/%m/%Y - %T") " My info : '$lanint'"}{print}' log.txt

Can you help me how to do it ?

swa056
  • 95
  • 6

0 Answers0