1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

calling awk from bash function not working

Discussion in 'Shell Script' started by spowel4, Aug 28, 2010.

  1. spowel4

    spowel4 New Member

    Aug 28, 2010
    Likes Received:
    Trophy Points:
    If I have the following line in a bash script, it works fine:
    CoDescDate=$(awk -F"\t" '{print $22}' $1)
    If I embed the above line in a function that is within the same bash script, the script seems to hang at the point of invoking the function.

    pay_ending_date () {
    CoDescDate=$(awk -F"\t" '{print $22}' $1)
    How I'm calling the function:
    I don't understand why it works when run directly from the script but doesn't work when embedded inside a function?

Share This Page