LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2013, 08:09 AM   #16
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390

Having a few minutes to go over your script I noticed this:

You mention these:
Code:
wkdaylst[1]='FPS-SCHED'
wkdaylst[2]='PODUKC-SCHED'
wkdaylst[3]='PODUKP-SCHED'
wkdaylst[4]='PODGCP-SCHED'
wkdaylst[5]='DRA-SCHED'
wkdaylst[6]='CMC-SCHED'
wkdaylst[7]='GPP-SCHED'
wkdaylst[8]='CDI-SCHED'
8 unique schedules. But you also mention this:
Code:
FPS R &amp
PODUKC R &amp
PODUKP R &amp
PODGCP R &amp
DRA R &amp
CMC R &amp
CDI R &amp
I count 7. Is GPP R &amp left out for a reason?

EDIT: And what about this entry in the rtview.txt example:
Code:
<row>
<OWNER>Satish Dubey</OWNER>
<AREA>CONSUMER INDIA</AREA>
<GROUP>CARD (IN) TRIUMPH</GROUP>
<SERVICE>CARD (IN) TRIUMPH</SERVICE>
<KPI>BLLBPSDC - FPS DEDUP &amp; SPLIT</KPI>
<STATE>0.0</STATE>
<LASTUPDATED>1385724827233</LASTUPDATED>
<DESCRIPTION>JOB COMPLETED Fri 02/12/13 11:33</DESCRIPTION>
<SOURCE>COC</SOURCE>
<CITYPE>KPI</CITYPE>
</row>
Can it be ignored?

Last edited by druuna; 12-02-2013 at 08:11 AM.
 
Old 12-02-2013, 11:56 AM   #17
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Answers to your questions:
Having a few minutes to go over your script I noticed this:

You mention these:
Code:

wkdaylst[1]='FPS-SCHED'
wkdaylst[2]='PODUKC-SCHED'
wkdaylst[3]='PODUKP-SCHED'
wkdaylst[4]='PODGCP-SCHED'
wkdaylst[5]='DRA-SCHED'
wkdaylst[6]='CMC-SCHED'
wkdaylst[7]='GPP-SCHED'--- we can ignore this for now,as this will be added in future.
wkdaylst[8]='CDI-SCHED'

8 unique schedules. But you also mention this:
Code:

FPS R &amp
PODUKC R &amp
PODUKP R &amp
PODGCP R &amp
DRA R &amp
CMC R &amp
CDI R &amp

I count 7. Is GPP R &amp left out for a reason?-----> this feed will be added in future, for the time being we can ignore it.

EDIT: And what about this entry in the rtview.txt example:----> this is another page where we have to write another code so for now we can ignore the FPS DEDUP &amp.
Code:

<row>
<OWNER>Satish Dubey</OWNER>
<AREA>CONSUMER INDIA</AREA>
<GROUP>CARD (IN) TRIUMPH</GROUP>
<SERVICE>CARD (IN) TRIUMPH</SERVICE>
<KPI>BLLBPSDC - FPS DEDUP &amp; SPLIT</KPI>
<STATE>0.0</STATE>
<LASTUPDATED>1385724827233</LASTUPDATED>
<DESCRIPTION>JOB COMPLETED Fri 02/12/13 11:33</DESCRIPTION>
<SOURCE>COC</SOURCE>
<CITYPE>KPI</CITYPE>
</row>

Can it be ignored?--> Yes
=====================================================================================
Now
I'll try to explain the requirement again:


the rtview.txt file contains:
<row>

<OWNER>Sanjay Dubey</OWNER>

<AREA>CARD CONSUMER INDIA</AREA>

<GROUP>CARD (IN) TRIUMPH</GROUP>

<SERVICE>CARD (IN) TRIUMPH</SERVICE>

<KPI>BLLBTRC1 - FPS R &amp; V</KPI>

<STATE>0.0</STATE>

<LASTUPDATED>1385724812717</LASTUPDATED>

<DESCRIPTION>JOB COMPLETED Fri 29/11/13 11:33</DESCRIPTION>

<SOURCE>COC</SOURCE>

<CITYPE>KPI</CITYPE>

<row>

<OWNER>Sanjay Dubey</OWNER>

<AREA>CARD CONSUMER INDIA</AREA>

<GROUP>CARD (IN) TRIUMPH</GROUP>

<SERVICE>CARD (IN) TRIUMPH</SERVICE>

<KPI>BOLBPSHH - CMC R &amp; V</KPI>

<STATE>0.0</STATE>

<LASTUPDATED>1385726716217</LASTUPDATED>

<DESCRIPTION>JOB COMPLETED Fri 29/11/13 12:05</DESCRIPTION>

<SOURCE>COC</SOURCE>

<CITYPE>KPI</CITYPE>

</row>

Like wise the data would be for all feeds in this file.
===============================

steps:
1. there are feeds those come on weekday and weekends hence i made two lists:

weekday list( Mon to Fri)-----> (you will get the scheduled timings of these feeds in psd_schedules.cfg file)
wkdaylst[1]='FPS-SCHED'
wkdaylst[2]='PODUKC-SCHED'
wkdaylst[3]='PODUKP-SCHED'
wkdaylst[4]='PODGCP-SCHED'
wkdaylst[5]='DRA-SCHED'
wkdaylst[6]='CMC-SCHED'
wkdaylst[7]='CDI-SCHED'
wkdaylst[8]='GPP-SCHED'--->This can be ignored as of now.(because it is not available in rtview.txt file, will be added in future)

weekend list (Saturday and Sunday)-----> (you will get the scheduled timings of these feeds in psd_schedules.cfg file)
(we do not receive CDI feed on Satuday and Sunday , hence we have excluded this feed from weekend list and need to include this in else part)
wkendlst[1]='FPS-SCHED'
wkendlst[2]='PODUKC-SCHED'
wkendlst[3]='PODUKP-SCHED'
wkendlst[4]='PODGCP-SCHED'
wkendlst[5]='DRA-SCHED'
wkendlst[6]='CMC-SCHED'
wkendlst[7]='GPP-SCHED'--->This can be ignored as of now.(because it is not available in rtview.txt file, will be added in future)



2. now we have a file psd_schedules.cfg in which every feeds timings is mentioned, for e.g. FPS R &amp feed usually comes on every after 1 hour:
vi psd_schedules.cfg
#First column data streams

FPS-SCHED|00:30|01:30|02:30|03:30|:04:30|05:30|06:30|07:30|08:30|09:30|10:30|11:30|12:30|13:30|14:30|15: 30|16:30|17:30|18:30|19:30|20:30|21:30|22:30|23:30|

PODUKC-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

PODUKP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

PODGCP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

DRA-SCHED|00:10|01:10|02:10|03:10|:04:10|05:10|06:10|07:10|08:10|09:10|10:10|11:10|12:10|13:10|14:10|15: 10|16:10|17:10|18:10|19:10|20:10|21:10|22:10|23:10|

CMC-SCHED|00:05|01:05|02:05|03:05|:04:05|05:05|06:05|07:05|08:05|09:05|10:05|11:05|12:05|13:05|14:05|15: 05|16:05|17:05|18:05|19:05|20:05|21:05|22:05|23:05|

#CDI comes once a day on week days only

CDI-SCHED|06:01|

GPP-SCHED|08:26|09:26|10:26|11:26|12:26|13:26|14:26|15:26|16:26|17:26|18:26|19:26|



3. now what we have to do is, for feed FPS R &amp, we need to match the current system time (lets say 00:30)with the fps schedule timings in psd_schedules.cfg(it is also 00:30) , and on the same time (00:30) if we get data for "FPS R &amp" in rtview.txt, then will find the status , date, time from rtview.txt and will show it as grren if it is in COMPLETED, If the status is FAILED will mark it as RED.

if the "FPS R &amp" feed doesn't come on 00:30 in rtview.txt, then as the script is running everyafter 2 mins and "FPS R &amp" feed comes after scheduled time(00:30)


after 00:36 if we donot receive FPS R &amp in rtview.txt then will mark it as "AMBER"(delay 5 mins than actual scheduled time), if we donot receive "FPS R &amp" after 00:40 then will mark it as "RED"(delay 10 mins than actual scheduled time) but if feed "FPS R &amp" comes in at 00:50 will mark it as "GREEN"(means whenever feed comes in will mark it as "GREEN") and then will move for next schedule time i.e 01:30|02:30|03:30 like wise..


similar process we need to follow for rest of the feeds as well:

'PODUKC R &amp'
'PODUKP R &amp'
'PODGCP R &amp'
'DRA R &amp'
'CMC R &amp'
'CDI R &amp'---> #CDI comes once a day on week days only. (mentioned the timings in psd_schedules.cfg file)




4.so we need to prepare script according to the feed that comes on weekdays and weekends. that is what we are looking for.


please let me know if you need any more details. need to sort it...


Thanks a lot for all your help and time...

Last edited by santosh0782; 12-02-2013 at 12:02 PM.
 
Old 12-02-2013, 12:38 PM   #18
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Have a look at this:
Code:
#!/usr/bin/ksh
# -------------------------------------------------------------------------- #
#set -x

# Script is based on en_US.utf8 layout, force this to make sure.
export LC_ALL="en_US.utf8"

dataDir="/home/www/BCARD/data/psd"
scriptDir="/home/www/BCARD/scripts/psd"

rtView="rtview.txt"
psdShed="psd.schedules.cfg"

# targets
kpiArray[0]='CDI'     # Mon -> Fri 
kpiArray[1]='CMC'     # Mon -> Sun 
kpiArray[2]='DRA'     # Mon -> Sun 
kpiArray[3]='FPS'     # Mon -> Sun 
kpiArray[4]='PODGCP'  # Mon -> Sun 
kpiArray[5]='PODUKC'  # Mon -> Sun 
kpiArray[6]='PODUKP'  # Mon -> Sun
#kpiArray[7]='GPP'     # Mon -> Sun      ( add future entries as you like)
#kpiArray[8]='XYZ'     # Mon -> Sun      ( add future entries as you like)

# date and time
currDay=$( date +'%a' )          # Mon -> Sun
currDate1=$( date +'%d/%m/%y' )  # DD/MM/YY
currDate2=$( date +'%Y/%m/%d' )  # YYYY/MM/DD
currTime=$( date '+%R' )         # HH:MM
currTimeSec=$( date '+%T' )      # HH:MM:SS
currHour=$( date '+%H' )         # HH
currMin=$( date '+%M' )          # MM

# -------------------------------------------------------------------------- #
# functions
getKpiInfo() {
  # get specific info from rtView
  kpiTarget=( $( grep -A3 "${thisKPI} R &amp" ${dataDir}/${rtView} | tail -1 | tr '[><]' ' ' ) )
  [[ "${kpiTarget[0]}" == "" ]] && echo "  no entry found in ${rtView}" && continue

  kpiStatus=${kpiTarget[2]}   # COMPLETED or FAILED
  kpiDate=${kpiTarget[4]}     # DD/MM/YY
  kpiTime=${kpiTarget[5]}     # HH:MM
  kpiDay=${kpiTarget[3]}      # Mon -> Sun
  kpiHour=${kpiTarget[5]%:*}  # HH
  kpiMin=${kpiTarget[5]#*:}   # MM

  # get specific info from psdShed
  mtchTime=$( grep "${thisKPI}-SCHED" ${scriptDir}/${psdShed} | grep "${currTime}" )

}

# -------------------------------------------------------------------------- #
# main
for thisKPI in "${kpiArray[@]}"
do
  # CDI not on Sat/Sun
  [[ "${currDay}" =~ (Sat|Sun) && "${thisKPI}" == "CDI" ]] && continue

  # lets do some work
  echo -e "-----------------------------------------------\nProcessing: ${thisKPI}"

  getKpiInfo

  # do checks and generate output accordingly
  if [[ "${currDate1}" == "${kpiDate}" ]]
  then
    if [[ -n "${mtchTime}" ]]
    then
      echo "  ${currTime} is available in configuration file"
      if [[ "${currTime}" == "${kpiTime}" && "${kpiStatus}" == "COMPLETED" ]]
      then
        echo "  GREEN...!!!"
      elif [[ "${currTime}" == "${kpiTime}"  && "${kpiStatus}" == "FAILED" ]]
      then
        echo "  RED...!!!"
      else
        echo "  none of the conditions are met"
      fi
    fi
    if [[ -z "${mtchTime}" ]]
    then
      echo "  ${currTime} is not available in configuration file"
      if [[ "${currTime}" != "${kpiTime}" ]]
      then
        rtvDt=$( echo "${kpiDate} ${kpiTime}" | awk -F"[ /]" '{ print "20"$3"/"$2"/"$1" "$4 ":00" }' )
        delayMin=$(( ( $(date -d "${currDate2} ${currTimeSec}" +%s ) - $( date -d "${rtvDt}" +%s ) ) / 60 ))
        echo "  time difference : ${delayMin} minutes."
        [[ ${delayMin} -ge 10 ]]                      && echo "  RED !!!!"    # mins >= 10 
        [[ ${delayMin} -ge 5 && ${delayMin} -lt 10 ]] && echo "  AMBER !!"  # mins >= 5 < 10
        [[ ${delayMin} -lt 5 ]]                       && echo "  GREEN"  # mins < 5
      fi
    fi
  fi
done
echo "-----------------------------------------------"

exit 0

# -------------------------------------------------------------------------- #
# End
Making the above script capable to handle R &amp and DEDUP &amp (and more) isn't that hard I believe.
 
1 members found this post helpful.
Old 12-03-2013, 07:12 AM   #19
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Thanks a lot for all your help and time, the script is working fine. need last favour from you.
but as per the latest need we have to reflect RED, AMBER, GREEN color, in a xml file, have added an array and made little changes as per the dashboard we want to display, but it is not picking the value.
according to the requirement, I have made the changes in array to take the values per dashboad's sequence:

kpiArray[0]='FPS' # Mon -> Sun
kpiArray[1]='PODUKC' # Mon -> Sun
kpiArray[2]='PODUKP' # Mon -> Sun
kpiArray[3]='PODGCP' # Mon -> Sun
kpiArray[4]='DRA' # Mon -> Sun
kpiArray[5]='CMC' # Mon -> Sun
kpiArray[6]='CDI' # Mon -> Fri
#kpiArray[7]='GPP' # Mon -> Sun ( add future entries as you like)
#kpiArray[8]='XYZ' # Mon -> Sun ( add future entries as you like)

valArray[0]='65'
valArray[1]='195'
valArray[2]='325'
valArray[3]='455'
valArray[4]='585'
valArray[5]='715'
valArray[6]='845'
#valArray[7]='65' ( add future entries as you like)
#valArray[8]='65' ( add future entries as you like)


now in the script i am using this valArray, however, it is only showing the value as 65 only. it should take all the values according to the kpiArray.
sample xml(presently it is taking 65 for all 7 feeds):
<annotation type='circle' color='FF0000' x='100' y='65' radius='20' />
<annotation type='circle' color='FF0000' x='100' y='195' radius='20' /> and so on... till y='845'(should reflect like for FPS the y value would be '65', then for PODUKC the y value would be '195'... similar way for rest of the feeds)


current code with little addition:
Code:
#!/usr/bin/ksh
# -------------------------------------------------------------------------- #
#set -x

# Script is based on en_US.utf8 layout, force this to make sure.
export LC_ALL="en_US.utf8"

dataDir="/home/www/BCARD/data/psd"
scriptDir="/home/www/BCARD/scripts/psd"

rtView="rtview.txt"
psdShed="psd_schedules.cfg"

# targets
kpiArray[0]='FPS'     # Mon -> Sun
kpiArray[1]='PODUKC'     # Mon -> Sun
kpiArray[2]='PODUKP'     # Mon -> Sun
kpiArray[3]='PODGCP'     # Mon -> Sun
kpiArray[4]='DRA'  # Mon -> Sun
kpiArray[5]='CMC'  # Mon -> Sun
kpiArray[6]='CDI'  # Mon -> Fri
#kpiArray[7]='GPP'     # Mon -> Sun      ( add future entries as you like)
#kpiArray[8]='XYZ'     # Mon -> Sun      ( add future entries as you like)

valArray[0]='65'
valArray[1]='195'
valArray[2]='325'
valArray[3]='455'
valArray[4]='585'
valArray[5]='715'
valArray[6]='845'
#valArray[7]='65'
#valArray[8]='65'
# date and time
currDay=$( date +'%a' )          # Mon -> Sun
currDate1=$( date +'%d/%m/%y' )  # DD/MM/YY
currDate2=$( date +'%Y/%m/%d' )  # YYYY/MM/DD
currTime=$( date '+%R' )         # HH:MM
currTimeSec=$( date '+%T' )      # HH:MM:SS
currHour=$( date '+%H' )         # HH
currMin=$( date '+%M' )          # MM

# -------------------------------------------------------------------------- #
# functions
getKpiInfo() {
  # get specific info from rtView
  kpiTarget=( $( grep -A3 "${thisKPI} R &amp" ${dataDir}/${rtView} | tail -1 | tr '[><]' ' ' ) )
  [[ "${kpiTarget[0]}" == "" ]] && echo "  no entry found in ${rtView}" && continue

  kpiStatus=${kpiTarget[2]}   # COMPLETED or FAILED
  kpiDate=${kpiTarget[4]}     # DD/MM/YY
  kpiTime=${kpiTarget[5]}     # HH:MM
  kpiDay=${kpiTarget[3]}      # Mon -> Sun
  kpiHour=${kpiTarget[5]%:*}  # HH
  kpiMin=${kpiTarget[5]#*:}   # MM
  # get specific info from psdShed
  mtchTime=$( grep "${thisKPI}-SCHED" ${scriptDir}/${psdShed} | grep "${currTime}" )

}

# -------------------------------------------------------------------------- #

echo "<chart manageResize='1' bgAlpha='50' pallette='1' bgColor='FFFFFF' bgAlpha='45' bgRatio='50,45' bgAngle='90' showBorder='0'>" >${dataDir}/dp_val_v7.TMP.xml

echo "<annotations>" >>${dataDir}/dp_val_v7.TMP.xml


echo "<annotationGroup id='Grp1'>" >>${dataDir}/dp_val_v7.TMP.xml
# main
for thisKPI in "${kpiArray[@]}"
do
  # CDI not on Sat/Sun
  [[ "${currDay}" =~ (Sat|Sun) && "${thisKPI}" == "CDI" ]] && continue

  # lets do some work
  echo -e "-----------------------------------------------\nProcessing: ${thisKPI}"


  getKpiInfo

  # do checks and generate output accordingly
if [[ "${currDate1}" == "${kpiDate}" ]]
  then
    if [[ -n "${mtchTime}" ]]
    then
echo "  ${currTime} is available in configuration file"

                      if [[ "${currTime}" == "${kpiTime}" && "${kpiStatus}" == "COMPLETED" ]]
                      then
                        echo "  GREEN...!!!"
                        echo "<annotation type='circle' color='8BBA00' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml
                      elif [[ "${currTime}" == "${kpiTime}"  && "${kpiStatus}" == "FAILED" ]]
                      then
                        echo "  RED...!!!"
                        echo "<annotation type='circle' color='FF0000' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml
                      else
                        echo "  none of the conditions are met"
                      fi
    fi
    if [[ -z "${mtchTime}" ]]
    then
      echo "  ${currTime} is not available in configuration file"
                      if [[ "${currTime}" != "${kpiTime}" ]]
                      then
                        rtvDt=$( echo "${kpiDate} ${kpiTime}" | awk -F"[ /]" '{ print "20"$3"/"$2"/"$1" "$4 ":00" }' )
                        delayMin=$(( ( $(date -d "${currDate2} ${currTimeSec}" +%s ) - $( date -d "${rtvDt}" +%s ) ) / 60 ))
                        echo "  time difference : ${delayMin} minutes."
        [[ ${delayMin} -ge 70 ]]  && echo "  RED !!!!" && echo "<annotation type='circle' color='FF0000' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml # mins >= 10
        [[ ${delayMin} -ge 65 && ${delayMin} -lt 70 ]] && echo "  AMBER !!"  && echo "<annotation type='circle' color='FFA000' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml# mins >= 5 < 10
        [[ ${delayMin} -lt 65 ]]    && echo "  GREEN"  && echo "<annotation type='circle' color='8BBA00' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml # mins < 5
                      fi
    fi
elif [[ "${currDate1}" != "${kpiDate}" ]]
then
        if [[ -z "${mtchTime}" ]]
        then
        echo "  ${currTime} is not available in configuration file"
if [[ "${currTime}" != "${kpiTime}" ]]
                      then
                        rtvDt=$( echo "${kpiDate} ${kpiTime}" | awk -F"[ /]" '{ print "20"$3"/"$2"/"$1" "$4 ":00" }' )
                        delayMin=$(( ( $(date -d "${currDate2} ${currTimeSec}" +%s ) - $( date -d "${rtvDt}" +%s ) ) / 60 ))
                        echo "  time difference : ${delayMin} minutes."
        [[ ${delayMin} -ge 70 ]]  && echo "  RED !!!!" && echo "<annotation type='circle' color='FF0000' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml # mins >= 10
        [[ ${delayMin} -ge 65 && ${delayMin} -lt 70 ]] && echo "  AMBER !!"  && echo "<annotation type='circle' color='FFA000' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml # mins >= 5 < 10
        [[ ${delayMin} -lt 65 ]]    && echo "  GREEN"  && echo "<annotation type='circle' color='8BBA00' x='100' y="${valArray}" radius='20' />" >>${dataDir}/dp_val_v7.TMP.xml # mins < 5
                      fi
    fi

fi
echo "</annotationGroup>" >>${dataDir}/dp_val_v7.TMP.xml
done
echo "-----------------------------------------------"
exit 0

# -------------------------------------------------------------------------- #
# End
please...need your help to sort this..
Thanks a lot in advance

Last edited by santosh0782; 12-03-2013 at 07:29 AM.
 
Old 12-03-2013, 08:35 AM   #20
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
And more surprises turn up

The way you try to implement and use the valArray won't work.
- Something like this y="${valArray}" will never work, you need to tell which index to use. Example: To assign entry 1 -> y="${valArray[1]}"

In this case you need an associative array, otherwise you need to be really creative to get the matching number that goes with, for example, DRA (number would be 4, and valArray[4] would print the correct value.

An associative array can do this: valArray[DRA]

Have a look at this:
Code:
#!/usr/bin/ksh
# -------------------------------------------------------------------------- #
#set -x

# Script is based on en_US.utf8 layout, force this to make sure.
export LC_ALL="en_US.utf8"

dataDir="/home/www/BCARD/data/psd"
scriptDir="/home/www/BCARD/scripts/psd"

rtView="rtv.test.txt"
psdShed="psd_schedules.cfg"
dpVal="dp_val_v7.TMP.xml"

# targets
kpiArray[0]='FPS'     # Mon -> Sun
kpiArray[1]='PODUKC'     # Mon -> Sun
kpiArray[2]='PODUKP'     # Mon -> Sun
kpiArray[3]='PODGCP'     # Mon -> Sun
kpiArray[4]='DRA'  # Mon -> Sun
kpiArray[5]='CMC'  # Mon -> Sun
kpiArray[6]='CDI'  # Mon -> Fri

# this array needs to be associative
typeset -A valArray
valArray[FPS]='65'
valArray[PODUKC]='195'
valArray[PODUKP]='325'
valArray[PODGCP]='455'
valArray[DRA]='585'
valArray[CMC]='715'
valArray[CDI]='845'

# date and time
currDay=$( date +'%a' )          # Mon -> Sun
currDate1=$( date +'%d/%m/%y' )  # DD/MM/YY
currDate2=$( date +'%Y/%m/%d' )  # YYYY/MM/DD
currTime=$( date '+%R' )         # HH:MM
currTimeSec=$( date '+%T' )      # HH:MM:SS
currHour=$( date '+%H' )         # HH
currMin=$( date '+%M' )          # MM

# -------------------------------------------------------------------------- #
# functions
getKpiInfo() {
  # get specific info from rtView
  kpiTarget=( $( grep -A3 "${thisKPI} R &amp" ${dataDir}/${rtView} | tail -1 | tr '[><]' ' ' ) )
  [[ "${kpiTarget[0]}" == "" ]] && echo "  no entry found in ${rtView}" && continue

  kpiStatus=${kpiTarget[2]}   # COMPLETED or FAILED
  kpiDate=${kpiTarget[4]}     # DD/MM/YY
  kpiTime=${kpiTarget[5]}     # HH:MM
  kpiDay=${kpiTarget[3]}      # Mon -> Sun
  kpiHour=${kpiTarget[5]%:*}  # HH
  kpiMin=${kpiTarget[5]#*:}   # MM

  # get specific info from psdShed
  mtchTime=$( grep "${thisKPI}-SCHED" ${scriptDir}/${psdShed} | grep "${currTime}" )

}

# -------------------------------------------------------------------------- #

echo "<chart manageResize='1' bgAlpha='50' pallette='1' bgColor='FFFFFF' bgAlpha='45' bgRatio='50,45' bgAngle='90' showBorder='0'>" >${dataDir}/${dpVal}
echo "<annotations>" >>${dataDir}/${dpVal}
echo "<annotationGroup id='Grp1'>" >>${dataDir}/${dpVal}

# main
for thisKPI in "${kpiArray[@]}"
do
  # CDI not on Sat/Sun
  [[ "${currDay}" =~ (Sat|Sun) && "${thisKPI}" == "CDI" ]] && continue

  # lets do some work
  echo -e "-----------------------------------------------\nProcessing: ${thisKPI}"

  getKpiInfo

  # do checks and generate output accordingly
if [[ "${currDate1}" == "${kpiDate}" ]]
  then
    if [[ -n "${mtchTime}" ]]
    then
      echo "  ${currTime} is available in configuration file"

      if [[ "${currTime}" == "${kpiTime}" && "${kpiStatus}" == "COMPLETED" ]]
      then
        echo "  GREEN...!!!"
        echo "<annotation type='circle' color='8BBA00' x='100' y='${valArray[${thisKPI}]}' radius='20' />" >>${dataDir}/${dpVal}
      elif [[ "${currTime}" == "${kpiTime}"  && "${kpiStatus}" == "FAILED" ]]
      then
        echo "  RED...!!!"
        echo "<annotation type='circle' color='FF0000' x='100' y='${valArray[${thisKPI}]}' radius='20' />" >>${dataDir}/${dpVal}
      else
        echo "  none of the conditions are met"
      fi
    fi
    if [[ -z "${mtchTime}" ]]
    then
      echo "  ${currTime} is not available in configuration file"
      if [[ "${currTime}" != "${kpiTime}" ]]
      then
        rtvDt=$( echo "${kpiDate} ${kpiTime}" | awk -F"[ /]" '{ print "20"$3"/"$2"/"$1" "$4 ":00" }' )
        delayMin=$(( ( $(date -d "${currDate2} ${currTimeSec}" +%s ) - $( date -d "${rtvDt}" +%s ) ) / 60 ))
        echo "  time difference : ${delayMin} minutes."

        # >= 70
        [[ ${delayMin} -ge 70 ]] && echo "  RED !!!!" && \
          echo "<annotation type='circle' color='FF0000' x='100' y='${valArray[${thisKPI}]}' radius='20' />" >>${dataDir}/${dpVal}

        # >= 65  < 70
        [[ ${delayMin} -ge 65 && ${delayMin} -lt 70 ]] && echo "  AMBER !!" && \
          echo "<annotation type='circle' color='FFA000' x='100' y='${valArray[${thisKPI}]}' radius='20' />" >>${dataDir}/${dpVal}

        # < 65
        [[ ${delayMin} -lt 65 ]] && echo "  GREEN" && \
          echo "<annotation type='circle' color='8BBA00' x='100' y='${valArray[${thisKPI}]}' radius='20' />" >>${dataDir}/${dpVal}

      fi
    fi
fi
echo "</annotationGroup>" >>${dataDir}/${dpVal}
done
echo "-----------------------------------------------"
exit 0

# -------------------------------------------------------------------------- #
# End

Last edited by druuna; 12-03-2013 at 11:55 AM. Reason: typo (print -> assign)
 
1 members found this post helpful.
Old 12-03-2013, 12:25 PM   #21
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Thanks a Ton... :-)
as i am new to this scripting world, bothering you a lot... you are really a great shell scriptor... i also want to be like you in this scripting world....so would like to learn many things from you.. Thanks in advance for all your help:-)

as i am away from my desk,i'll run this script by tomorrow, will let you know the status.. Thanks a lot once again...

one last question ;-)

if in case, i need to make a script which would check only for the timings that are mentioned in configuration file(psd_schedules.cfg), lets say for PODUKC-SCHED, first feed comes on or after 09:10, second time feed comes on or after 10:10.....likewise the last feed comes on or after 20:10 after that again on next day will get the feed on or after @09:10.. so in this case if last feed comes after 20:10 i.e on 20:50 or any time after 20:10 will mark it as GREEN(because the feed is there, however will mark it as "AMBER"(when it is delayed by 5 mins from its actual arrival time mentioned in "psd_schedules.cfg") and will mark it to "RED"(when it is delayed by 10 or more mins from its actual arrival time mentioned in "psd_schedules.cfg"), after that anytime if we get the feed in rtview.txt will mark it to GREEN again)

in this way, if needs to apply same logic for other feeds like CDI which comes only once in a day on or after 06:05(per its actual arrival time mentioned in "psd_schedules.cfg") and when gets delayed by more than 5 mins from its actual arrival time mentioned in "psd_schedules.cfg" will mark it as "AMBER". When delayed by 10 mins from its actual time in configuration then will mark it as "RED" and if at any times feed comes in then will Mark it to "GREEN" until its next schedule on next day. similar for other feeds according to their timings in "psd_schedules.cfg"

in the earlier script it checks for 24hrs for all the feeds,and displays the Red, Green, Amber according to its last rtview.txt timestamp. but if we want to make the script according to above mentioned idea is it possible?(and considering that this script is running every after 2mins)

here is the actual arrival time of feeds, mentioned in configuration file(psd_schedules.cfg):
#First column data streams

FPS-SCHED|00:30|01:30|02:30|03:30|:04:30|05:30|06:30|07:30|08:30|09:30|10:30|11:30|12:30|13:30|14:30|15: 30|16:30|17:30|18:30|19:30|20:30|21:30|22:30|23:30|
PODUKC-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|
PODUKP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|
PODGCP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|
DRA-SCHED|00:10|01:10|02:10|03:10|:04:10|05:10|06:10|07:10|08:10|09:10|10:10|11:10|12:10|13:10|14:10|15: 10|16:10|17:10|18:10|19:10|20:10|21:10|22:10|23:10|
CMC-SCHED|00:05|01:05|02:05|03:05|:04:05|05:05|06:05|07:05|08:05|09:05|10:05|11:05|12:05|13:05|14:05|15: 05|16:05|17:05|18:05|19:05|20:05|21:05|22:05|23:05|

#CDI comes once a day on week days only
CDI-SCHED|06:01|

GPP-SCHED|08:26|09:26|10:26|11:26|12:26|13:26|14:26|15:26|16:26|17:26|18:26|19:26|
 
Old 12-03-2013, 03:23 PM   #22
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
This will make things more complicated and you really need to think about this and how to implement it.

The current way things are done doesn't really work;
- Certain conditions are ignored
- You cannot be sure that the run time fetched from rtview.txt corresponds with the time in psd_schedules.cfg
- Allows for 60/65/70 mins, while time between runs is (mostly) 60 mins.

What you probably need to do is (roughly):
- get the exact refresh schedule for rtview.txt (every 5 mins? also when empty? only when job(s) have finished? added to or new file ,etc)
- assuming a new rtview.txt file is created every 5 mins: script runs every 5 mins.
- for every target (CDI is example)
- establish a valid time window based on the current time (current time 06:05 , window 05:06 -> 06:05)
- check if a time in psd_schedules.cfg fits this window range (yes, 06:01 matches)
- calculate difference (06:05 - 06:01 -> 4 mins late)
- set status (GREEN/AMBER/RED depending on difference)

- if the time does not match window: job took longer than 59 mins or a "stray/test/????" job (PURPLE)
- if window is present but no time: Job should have run but did not (BLACK)

Too be honest: looking at what you did this far, I think implementing this will be a tough nut to crack for you. But a challenge should be welcome, right

Your current script is very rapidly coming to a point where "small" additions/changes will require major re-writes and a script that will not be (easily) maintainable/readable. It might not be a bad idea to gather possible missing info, re-examine all the things that need to be done and start with a clean sheet.

BTW: The above posted psd_schedules.cfg has (multiple) typo's: :04:05 should be 04:05 (mind the leading : )

Last edited by druuna; 12-03-2013 at 05:33 PM. Reason: fixed typo (staus -> status)
 
Old 12-04-2013, 04:01 AM   #23
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Tip: To make things more manageable you might consider using a separate configuration file that holds all the run data that is currently hard coded into the script.

To my knowledge there are 3 things that are important:
- psd target (CDI, FPS etc),
- y value for xml file,
- days on which pds target should run.

Have a look at this example:
Code:
# -------------------------------------------------------------------------- #
# psd.run.data.cfg
# -------------------------------------------------------------------------- #
# Target  Y-Value  Day [Day Day]
CDI       845      Mon
CMC       715      Mon Tue
DRA       585      Mon Tue Wed
FPS       65       Mon Tue Wed Thu
PODGCP    455      Mon Tue Wed Thu Fri Sat Sun
PODUKC    195      Mon Wed Fri
PODUKP    325      Tue Thu
# -------------------------------------------------------------------------- #
# End
This file is easy to edit or add to and it also gives you a clear picture of what is what. This also prevents having to edit the script itself when data needs to be changed or added.

One of the first things to do from the script is to parse the above configuration file so that all the info is available.
 
Old 12-04-2013, 12:26 PM   #24
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Thanks a lot for all your help and suggestions, you tried a lot however as per the need it is really going tougher...
==================================
As advised by you int the post #20, i tried running the script, however getting this error:

final.sh: line 25: typeset: -A: invalid option

typeset: usage: typeset [-afFirtx] [-p] name[=value] ...
-----------------------------------------------
Processing: FPS
11:12 is not available in configuration file
time difference : 40 minutes.
GREEN
-----------------------------------------------
Processing: PODUKC
11:12 is not available in configuration file
time difference : 2 minutes.
GREEN
-----------------------------------------------
Processing: PODUKP
11:12 is not available in configuration file
time difference : 2 minutes.
GREEN
-----------------------------------------------
Processing: PODGCP
11:12 is not available in configuration file
time difference : 2 minutes.
GREEN
-----------------------------------------------
Processing: DRA
11:12 is not available in configuration file
time difference : 2 minutes.
GREEN
-----------------------------------------------
Processing: CMC
11:12 is not available in configuration file
time difference : 7 minutes.
GREEN
-----------------------------------------------
Processing: CDI
11:12 is not available in configuration file
time difference : 312 minutes.
RED !!!!

and xml file is taking only 1 value as y=845 only:
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='FF0000' x='100' y='845' radius='20' />
====================================
also, as advised by you in post #22, this is really going tougher as there are many points to consider while doing a script.
but if we go ahead, with the suggestions you provided in post #23, how could we build a script for the same(considering the CDI comes once a day on weedays only, i think we need to write a seperate if condition for CDI feed ) with maintaining a seperate configuration file like as:
Psd_schedules.cfg:
# -------------------------------------------------------------------------- #
# psd.run.data.cfg

# -------------------------------------------------------------------------- #
#Target Y-Value Day [Day Day] Feed arival schedule

FPS 65 Mon Tue Wed Thu Fri Sat Sun FPS-SCHED|00:30|01:30|02:30|03:30|04:30|05:30|06:30|07:30|08:30|09:30|10:30|11:30|12:30|13:30|14:30|15:3 0|16:30|17:30|18:30|19:30|20:30|21:30|22:30|23:30|

PODUKC 195 Mon Tue Wed Thu Fri Sat Sun PODUKC-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

PODUKP 325 Mon Tue Wed Thu Fri Sat Sun PODUKP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

PODGCP 455 Mon Tue Wed Thu Fri Sat Sun PODGCP-SCHED|09:10|10:10|11:10|12:10|13:10|14:10|15:10|16:10|17:10|18:10|19:10|20:10|

DRA 585 Mon Tue Wed Thu Fri Sat Sun DRA-SCHED|00:10|01:10|02:10|03:10|04:10|05:10|06:10|07:10|08:10|09:10|10:10|11:10|12:10|13:10|14:10|15:1 0|16:10|17:10|18:10|19:10|20:10|21:10|22:10|23:10|

CMC 715 Mon Tue Wed Thu Fri Sat Sun CMC-SCHED|00:05|01:05|02:05|03:05|04:05|05:05|06:05|07:05|08:05|09:05|10:05|11:05|12:05|13:05|14:05|15:0 5|16:05|17:05|18:05|19:05|20:05|21:05|22:05|23:05|

CDI 845 Mon Tue Wed Thu Fri CDI-SCHED|06:01|

#--------------------------------------------------------------------------- #
also, how could we build a script which will consider their specified time window... getting tougher...
anyways, i learnt great things from you, and would like to learn a lot in coming days... i will keep you posted my queries ...Thanks a lot once again... :-)

Last edited by santosh0782; 12-04-2013 at 12:28 PM.
 
Old 12-04-2013, 01:47 PM   #25
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Quote:
Originally Posted by santosh0782 View Post
As advised by you int the post #20, i tried running the script, however getting this error:

final.sh: line 25: typeset: -A: invalid option

typeset: usage: typeset [-afFirtx] [-p] name[=value] ...
I was wondering when something like this would happen. I did think of it before and even asked you about it, which you did not answer (post #9)
Quote:
Originally Posted by druuna
- Is ksh needed or can this be done in bash? If bash can be used: Which bash version are you using?
- Does this script run on a Linux platform or on a Unix platform (if Unix, which one)?
The typeset -A arrayname I used works on bash (GNU bash, version 4+) and ksh (AT&T/93s+ 2008-01-31) on Linux.


Quote:
Originally Posted by santosh0782
also, as advised by you in post #22, this is really going tougher as there are many points to consider while doing a script.
You can only build a good script when you have all the available information and have a good idea of the flow/logic needed to get the results that are wanted.


Quote:
Originally Posted by santosh0782
but if we go ahead, with the suggestions you provided in post #23, how could we build a script for the same(considering the CDI comes once a day on weedays only, i think we need to write a seperate if condition for CDI feed ) with maintaining a seperate configuration file
The CDI record isn't an exception and it doesn't need special attention.

It doesn't matter if a job needs to run 1 or 7 times a week and 1 or 24 times a day, that info comes from a configuration file(s) and the script logic should take care of it.

I've been assuming that rtview.txt and psd.schedules.cfg could not be changed (no extra fields and/or layout changes possible), that's why I added a second configuration file. If psd.schedules.cfg isn't a given and can still be changed it might make things somewhat easier.

There are a few considerations to think of when deciding on 1 or 2 (or 3?) configuration files.
- 1 configuration file sounds good, but it might become too wide to be comfortable (from a human point of view).
- 2 or more configuration files makes it easier to see what is done when and how. Changes might have to be done on multiple files, which might be a downside of multiple configuration files.


Quote:
also, how could we build a script which will consider their specified time window...
Have a look at this:
Code:
#!/bin/bash
export LC_ALL=en_US.utf8

# lower and upper boundry
lowDate=$( date --date="Wed 04/12/13 18:40" '+%s' )
highDate=$( date --date="Wed 04/12/13 19:40" '+%s' )

# date to check
chkDate=$( date --date="Wed 04/12/13 19:10" '+%s' )

echo $lowDate
echo $chkDate
echo $highDate

if [ $chkDate -gt $lowDate -a $chkDate -lt $highDate ]
then
  echo "Ok"
else
  echo "Not ok"
fi
 
Old 12-04-2013, 11:10 PM   #26
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Thanks a ton :-)

as advised in post #25, i'll try to implement the logic provided by you, and will let you know the status.

regarding post number #9:
(post #9)
Quote:
Originally Posted by druuna
- Is ksh needed or can this be done in bash? If bash can be used: Which bash version are you using?
- Does this script run on a Linux platform or on a Unix platform (if Unix, which one)?
The typeset -A arrayname I used works on bash (GNU bash, version 4+) and ksh (AT&T/93s+ 2008-01-31) on Linux.

=====
the shell is bash, but as i advised to me i was writing a script in ksh, however the details of shell are:
[rt6000605:~]$ echo $SHELL
/bin/bash

[rt6000605:~]$ uname -a
Linux rt6000605 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
 
Old 12-05-2013, 03:06 AM   #27
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Quote:
Originally Posted by santosh0782 View Post
the shell is bash, but as i advised to me i was writing a script in ksh, however the details of shell are:
[rt6000605:~]$ echo $SHELL
/bin/bash
The shell you used in the script is ksh (#!/bin/ksh) and not bash (#!/bin/bash). If bash should be used you do need to change that (see the BTW at the bottom).

The echo $SHELL command doesn't tell anything useful about bash itself. If you want to know the bash/ksh version:
Code:
$ bash --version
$ ksh --version
Quote:
[rt6000605:~]$ uname -a
Linux rt6000605 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
This seems to be a Linux box (RHEL 5?).

BTW: If RHEL 5 is used then I would advise you to use ksh (/bin/ksh). Ksh does make use of typeset -A arrayname. The bash version used in RHEL 5 does not.

Last edited by druuna; 12-05-2013 at 03:09 AM.
 
Old 12-05-2013, 04:37 AM   #28
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
Bash version is:

$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.


ksh version is:
$ ksh --version
version sh (AT&T Research) 93t+ 2010-02-02

which shell should i use in the script, so that typeset -A arrayname will work?
 
Old 12-05-2013, 04:47 AM   #29
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Quote:
Originally Posted by santosh0782 View Post
which shell should i use in the script, so that typeset -A arrayname will work?
As mentioned in my previous post: ksh

To be absolutely clear; The first line of your script needs to be:
Code:
#!/bin/ksh
 
Old 12-05-2013, 06:02 AM   #30
santosh0782
Member
 
Registered: Nov 2013
Posts: 132

Original Poster
Rep: Reputation: Disabled
but it is still giving the error in that script.
error:typeset: -A: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] ...


and in the output xml file it is taking only one y value 845 as:
<annotationGroup id='Grp1'>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='8BBA00' x='100' y='845' radius='20' />
</annotationGroup>
<annotation type='circle' color='FF0000' x='100' y='845' radius='20' />
</annotationGroup>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error running cron job, syntax error? mpyusko Debian 2 12-20-2012 10:57 AM
script.pl with sed shell calls: sh error syntax error near unexpected token `(' MMaddoxx Programming 7 11-24-2011 09:00 AM
syntax error on running configure file in cygwin sugan General 1 10-08-2010 02:34 AM
why am getting error ksh: syntax error: `fi' unexpected while running script deb4you Linux - Newbie 4 09-06-2008 09:37 AM
ERROR running make when installing Nvidia drivers (syntax error) randyriver10 Linux - Software 5 02-21-2004 05:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration