Unterminated Regular Expression

It is ok when I send send one arguement to $TILL in the awk expression.

first(){
    TILL=$1 
    echo $TILL
    awk '/[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist
[*]}  
}

echo "<table border = '1'>"
echo '<tr><td> </td><td>'  ; first 'c:   '</td></tr>'
echo '</table>'                

However when i send more than 3 arguement I recieved the unterminated regular expression.

first(){
    TILL=$1 
    echo $TILL
    awk '/[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist
[*]}  
}

echo "<table border = '1'>"
echo '<tr><td> </td><td>'  ; first 'c: NT Authority'  '</td></tr>'
echo '</table>'                                                                          

$ sh filepermission.sh
<table border = '1'>
<tr><td> </td><td>
c: NT AUTHORITY
awk: cmd. line:1: /[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /c:
awk: cmd. line:1:                                                                               ^ unterminated regexp
</table>

Did you consider double quoting the $TILL in awk 's regex constant?

BTW, this is NOT the usual way to convey a variable into an awk script... consider the -v option to awk .

awk '/[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist[*]} 

The reason why Awk is complaining I highlighted for you in red. The '\' escapes the '/' therefore, Awk doesn't see it as the end of regular expression delimiter.

Awk doesn't do variable expansion within '/ /', what you place there is taken as a literal pattern.
awk -v pattern="$TILL" '$0 ~ pattern' will allow you to search the variable pattern.

You need to be aware of that when you try to let the shell expand the $TILL by surrounding the rest of the code with single code.

Also consider double quoting when assigning $1 to TILL , otherwise you only get the first word.
Also, what is your expected output of function first ?