Bash script issue

A collection of scripts that perform the tricks

Bash script issue

Postby Shawnturner » Wed Jan 03, 2018 12:24 pm


Below is small part of bash script....this script pulls logs from another server thru SSH. Do you think there is some issue with this part of script. Although i am not scripting expert but i think.

sudo -u backup ssh ${serv} cat ""${fic}"" | gawk -v min=$dat_min -v max=$dat_max -F '|' 'BEGIN {dat_min=min;
dat_max=max} {split($2,a," ");split(a[1],b,"-");
date=b[1]" "b[2]" "b[3]" "c[1]" "c[2]" "c[3];date=mktime(date);
if ((date>=dat_min)&&(date<=dat_max))
{print $0}}'|fgrep -v 'additionnelles' >${tempFile}

Please help.

I didn't find the right solution from the Internet.

References: ... ost5800396

B2B Online Campaign Examples
Posts: 6
Joined: Mon Nov 20, 2017 7:10 am

Return to FoxyRoxyLinux - Scripts

Who is online

Users browsing this forum: No registered users and 1 guest