I need a help regarding awk print f
in shell script.
Please see the below my script
#!/bin/sh
date_time=`date '+%d-%b-%Y_%H:%M:%S'`
usr="test"
echo "Hai" | awk -V '{
printf("==========================================\n");
printf("|%10s|%10s|\n","Date" $date_time);
printf("|%10s|%10s|\n","user" $usr);
printf("==========================================\n");
}'
I want output as below
==============================
| date | 14-Jan-2016_16:49:40|
| user | Test |
==============================