AIX Grep For Changing Value

Discussion in 'Linux, BSD and Other OS's' started by X slash X, Jul 1, 2008.

  1. X slash X

    X slash X Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    What Command Do I Need To Use To grep For A Changing Value Without Having To Change My Command. eg LINE6=XXX1XXX, For Which "1" = "2" The Following Day: LINE6=XXX2XXX And The Following Day "2" = "3": LINE6=XXX3XXX And So On. My Grep Result Should Show 1 on Monday, 2 on Tuesday and 3 on Wednessday.
     
  2. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i think you are thinking too much about it & it making it over complicated

    for a date variable, you only need one variable e.g.

    #define variables
    &date &$day
    #day code
    if $date = "1" then $day = "Monday" else
    fi

    if $date = "2" then $day = "Tuesday" else
    fi

    if $date = "3" then $day = "Wednesday" else

    does that make sense ?

    i'm actually no good at scripting, but you get the idea, i hope
     

Share This Page