#How to print remainder of line using awk
eliminate the first X columns…
Here is your challenge you have a list of cronjobs and you want to just execute the scheduled backup command with its arguments for a test run.
Using one command line, how would you do it?
Here is a sample root cronjob and I want to run the first entry with its arguments as a test run:
# m h dom mon dow command
0 16 * * * /data/share/home/geoffm/dev/utils/bak-it.sh -i /usr/local/etc/include.lst -e /usr/local/etc/exclude.lst -t /data/bak/`hostname` -s 7 >/dev/null 2>&1
5 0 * * * /data/share/motion/arch-files.sh >/dev/null 2>&1
*/15 * * * * /data/share/home/geoffm/grab-pic.sh >/dev/null 2>&1
####### below are WIP or OLD ########
# 16 6 * * * /usr/sbin/lynis -c --auditor "automated" --cronjob --quiet >/dev/null 2>&1
#*/5 * * * * /usr/local/bin/watch-proc.sh -f /usr/local/etc/watch-proc.conf -n geoffm@localhost >/dev/null 2>&1
#*/5 * * * * /data/share/home/geoffm/ping-pong.sh "ping -c2 192.168.1.55" "ssh 192.168.1.1 reboot" >/dev/null
# 7 * * * /usr/local/sbin/postfix_report.sh &> /dev/null