I have three cron entries in a file /cron_entries as
15 * * * * /bin/hourjobs > /tmp/hrjob.log 2>&1
..................
....................
I am trying to read this file in for loop using code below:
cron=`cat /cron_entries`
for line in $cron
do
printf "%s\n" "$line" >> /tmp/$$current_cron
done
When i see in /tmp/$$current_cron , the "*" is getting replaced with all files in that directory.. I need to enter asterisk as it is into file without its wildcard functionality..
can i get solution for this...